Automatically Delete Duplicated Entries Error

F

faxylady

When attempting to do an Automatically Delete Duplicated Entries Procedure on
a Contacts infomation table imported from Outlook, I get the following
message after trying to set the phone number as the auto key.

Microsoft Office Access
The changes you requested to the table were not successful because they
would create duplicate values inthe index, primary key, or relationship.
Change the date in the field or fields that contain duplicate data, remove
the index, or redefine the index to permit duplicate entries and try again.

This did not occur when I used Access 2000. Why is it occurring now when I
am using Access 2003?

I notice that If I change the Indexed field to No, when I turn on the
autokey for the phone field, the Indexed field switches back to Yes(No
Duplicates).
 
J

John Spencer

Since a PRIMARY KEY must be unique, when you specify a field as the primary key,
Access automatically will build a unique (no duplicates) index.

So if you have two or more records with the same phone number, then you will get
the message that the field cannot be used as the primary key.

As far as I know this has ALWAYS been the case. The only explanation I can
think of is that when you used it earlier you were fortunate in that there were
no duplicates in the existing data.
 
F

faxylady

Thanks for your reply. I found out why I was getting the error message.
When I made a copy of the original table, I forgot to click Structure Only.
When I went back and did this, it worked. Thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top