98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Access Training and help » Problems setting a user defined primary key | Access forum
Problems setting a user defined primary key | Access forum
Resolved · Urgent Priority · Version 2003
Pasquale has attended:
Access Introduction course
Access Intermediate course
Access Advanced course
Problems setting a user defined primary key
I'm in the process of optimising old data in Excel, importing the data as tables and am trying to set a postcode as the primary key, but keep on getting this error message:
The Changes you made to the table were not successful because they would create duplicate values in the index, primary key or relationship. Change the date in the field or fields that contain duplicate data, remove the index, or redfine the index to permit dulpicate entries and try again.
How do I overcome this?
RE: Problems setting a user defined primary key
Hi Pasquale
Thanks for your question.
A primary key field must contain a unique value for each record. The message you are getting indicates that this is not the case, and that you have records that share the same postcode.
Thus you cannot use the postcode as a primary key. You must either use a different field as the primary key, or use a compound key that combines the postcode with another field.
Regards
Stephen
Sun 18 Apr 2010: Automatically marked as resolved.
Training information:
See also:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Access tip:Hide Access TablesOne method of stopping your Access tables appearing in Database window, is to rename the table(s) with the prefix usys. |