Primary Key Field Showing Duplicates

S

Steve

I am trying to set a text field that I know has unique values in it as the
primary key for my table, yet I get an error each time I try to save the
field as the Primary Key. The error states the requested change "would create
duplicate values in the index, primary key, or relationship." The field
values were imported from an Excel spreadsheet. I verified in Excel that each
row of text was unique (they are acronyms). What am I missing?
 
J

John W. Vinson

I am trying to set a text field that I know has unique values in it as the
primary key for my table, yet I get an error each time I try to save the
field as the Primary Key. The error states the requested change "would create
duplicate values in the index, primary key, or relationship." The field
values were imported from an Excel spreadsheet. I verified in Excel that each
row of text was unique (they are acronyms). What am I missing?

Might there be records which differ only in case? Access is case-insensitive,
so "ACh" and "ACH" will be seen as duplicates.

If that's not the issue, use the Query Wizard to create a "find duplicates"
query. Access wouldn't say there are duplicates unless there are.
 

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