Append query failed due to key violations

klar

Registered User.
Local time
Today, 05:43
Joined
Jan 3, 2012
Messages
20
Dear Access gurus,

I need to append data to existing records. I created an append query which failed due to key violations. The problem is this. New data fields were added to existing records. I need to append new data to the new data fields of the existing records. However, this may be the cause of the key violation because of the violation of primary key. Is my understanding correct?

Has anyone encountered similar problem before? Did you find any solution? Hope the experienced experts here can give some ideas. Thank you very much.
 
An append query does not not update existing records, it appends new records to the table. If you have added new fields to the table and you want to insert data into those fields, you need an update query. The new fields will simply be null for the existing records, so you just need to update them from null to whatever the new value is.
 
If you are trying to "Append" data to an existing, what you need is an Update Query to update the new fields on the existing records.

Remember an Append Query is used to add new records to a table, whilst an Update Query is used to update fields within existing records.
 
Thank you everyone for the answer. It is so wonderful to be surrounded by helpful gurus here.
 

Users who are viewing this thread

Back
Top Bottom