microsoft access append query key violation when there is no primary key

Harold E1 25 Reputation points
2026-09-27T01:41:22.0233333+00:00

I have Access as a subscription of Microsoft 365 under Windows 11 Pro.

I am trying to run an append query, but I get an error message: "didn't add records due to key violations".

However, the table I am trying to append it to, doesn't have ANY indexes, including a primary key!

How can there be a key violation, when there is no key?!?

Microsoft 365 and Office | Access | For home | Windows
0 comments No comments

1 answer

Sort by: Most helpful
  1. Teddie Dang 1,365 Reputation points Independent Advisor
    2026-09-27T02:09:45.83+00:00

    Hi @Harold E1

    In Microsoft Access, a key violation does not necessarily mean that the destination table has a primary key. It can also occur because of a unique index.

    According to Microsoft’s documentation, an append query can report key violations when the data conflicts with a primary key or an index in the destination table that does not allow duplicate values.

    You should therefore check the destination table in Design View > Indexes and make sure there isn't a unique index that you may have overlooked. This is also consistent with a Microsoft Q&A case where an unexpected key violation turned out to be caused by a unique index that was not initially noticed.

    Also, check the table in Database Tools > Relationships to see whether it participates in any relationships with Enforce Referential Integrity enabled. An enforced relationship can prevent records from being appended if the values being inserted do not satisfy the relationship.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.