View Full Version : key violation error


MarkGardner
11-12-2008, 12:03 PM
I am attempting an append query and I get a "key violation" error. I know it has something to do with a key field. I have added and removed the "key" and still get the same error of not being able update some records because of the error. I have the records sorted.

Any ideas?

Thanks.

Mark Gardner

boblarson
11-12-2008, 12:07 PM
I am attempting an append query and I get a "key violation" error. I know it has something to do with a key field. I have added and removed the "key" and still get the same error of not being able update some records because of the error. I have the records sorted.

Any ideas?

Thanks.

Mark Gardner

Mark:

A Key violation error isn't necessarily that your primary key is being violated (although that is the most recently). You can also get that error, if I remember correctly, if you have a field that is set to REQUIRED but you aren't supplying data.

MarkGardner
11-12-2008, 12:52 PM
Bob,
I made a discovery that I would like to share with you as a solution. In my macro, I delete the records in the target table just prior to running the append query. I thought that I had already put a delete records in the macro, but I guess not. It is there now and it works perfectly.

Thanks for your input.
Mark