error message creating primary
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 » Error message when creating primary key Access 2003

Error message when creating primary key Access 2003

resolvedResolved · Low Priority · Version Standard

replyReply Tue 4 Mar 2008, 16:57Delegate Jane said...

Jane has attended:
Access Introduction course
Access Intermediate course

Error message when creating primary key Access 2003

I'm trying to import data from a text file that contains duplicate data however, this is correct so I have allowed duplications when going through the import process. It is important that these duplicate ID's are the Primary Key.

I keep getting this message

"Error creating primary key on field 'Person ID' (The changes you requested to the table were not successful because they wouldc reate duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit dupliate entries and try again."

Once this message is received data does appear in a new Table however I'm worried that some of the information may have been affected.

My colleague who currently uses Access 2000 followed the same process and did not get an error message.

Any ideas how to get round this other than loading Access 2000 on my pc?

For upcoming training course dates see: Pricing & availability

replyReply Tue 18 Mar 2008, 15:40Trainer Pete said...

RE: Error message when creating primary key Access 2003

Hi Jane, Thank you for your post, In answer to your question, as I am sure you know; if you create a Primary key (on a Unique field) the field is set to the Index property of Yes (No Duplicates), this could be the reason for your initial error message. However if you change the properties to Yes (Duplicates OK) then you cannot use that field as a Unique identifier although you can still use the field in relationships if you so wish. If you have chosen to accept the Index of Yes (Duplicates OK) your data should be OK and your database should operate as required, although you will not be able to set Referential Integrity. My suggestion is that if your data will allow then you should change the index to allow Duplicates. I hope that helps, although I think you have already come to that decision, best regards Pete.

 

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

Access tip:

Hide Access Tables

One method of stopping your Access tables appearing in Database window, is to rename the table(s) with the prefix usys.

This converts the table into a system object, which cannot be viewed in the Database window.

You can show system objects in the Database window by the following:

Step 1: On the Tools menu, click Options.
Step 2: Click the View tab.
Under Show, select the System Objects check box.
Click OK.

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