problems setting user defined
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Access Training and help » Problems setting a user defined primary key

Problems setting a user defined primary key

resolvedResolved · Urgent Priority · Version 2003

replyReply Wed 7 Apr 2010, 13:04Delegate Pasquale said...

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?

For upcoming training course dates see: Pricing & availability

replyReply Mon 12 Apr 2010, 08:33Trainer Stephen said...

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.

 

Please browse our web site to find out more about
access.training and other Microsoft training courses.

Access tip:

Action queries

Unlike select queries you cannot use action queries as a data source for the use with forms or reports,as they do not return a dataset that can be read.

View all Access hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard