Fix Duplicate Values in an Index or Relationship in Microsoft Access
Question details
Identify and resolve values that conflict with a primary key, unique index, or relationship in a Microsoft Access database.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- A user is changing a table or its records and needs to determine why Access reports a duplicate-value conflict.
- Observed behavior
- Access warns that the change would create duplicate values in an index, primary key, or relationship, although duplicate records are not obvious.
Note which operation triggered the error, such as editing a record, importing data, or changing an index. Identify the affected table and any related tables so you can inspect their key fields.
Find conflicting values in primary keys and unique indexes
Use this method when saving, importing, or changing records triggers the duplicate-value error.
In the Navigation Pane, right-click the affected table and select Design View. Identify the primary key and check key fields entered manually or assigned with AutoNumber.
On the Table Design tab, select Indexes. Check which indexes have Unique set to Yes and note every field in each index; a multi-field index enforces uniqueness across the combined values.
Select Create > Query Wizard > Find Duplicates Query Wizard. Choose the affected table and the field or fields used by the unique index, then run the query to identify matching values.
Open the affected table in Datasheet View and correct conflicting values or the incoming values in the import source. For an AutoNumber key, avoid manually assigning a value that is already in use, then retry the operation.

Check relationship fields and referential integrity
Use this method when creating or editing a relationship, or when a conflict involves linked tables.
Work with Office documents using WPS Office
WPS Office is a free, lightweight alternative for documents, spreadsheets, and presentations. Its familiar interface and Microsoft Office format support make it easy to move everyday files between suites. It does not repair Microsoft Access databases.

Frequently Asked Questions
Why does Access report duplicates when the records look different?
A unique index may apply to one field or a combination of fields rather than the entire record. Open the table in Design View and select Indexes to see which values must be unique.
How do I find duplicate key values in Access?
Select Create > Query Wizard > Find Duplicates Query Wizard, choose the affected table, and select the field or fields used by the key or unique index.
Can I turn off the Unique setting to fix the error?
You can review the Unique property under Table Design > Indexes, but change it only if repeated values are valid and uniqueness is not required. A primary key must remain unique.
What field type should link to an AutoNumber primary key?
An AutoNumber key typically links to a Number field with Field Size set to Long Integer. Check both fields in their tables' Design View and ensure their definitions are compatible.
Does WPS Office fix Access index or relationship errors?
No. Use Microsoft Access to inspect and repair its database keys, indexes, and relationships. WPS Office is an alternative for working with documents, spreadsheets, and presentations.




