Append Query - Key Violations

Vega10

New Member
Joined
Feb 21, 2013
Messages
7
Hello everyone!
Happy Munday! or is it...
I have an issue with my Access Database. I have an append query set up and when I attempt to run it, I get the error of
Microsoft Access can't append all the records in the append query....it didn't add 4 records to the table due to key violations.

I've checked my source data, and I can't determine what the "key violations" are.

Is there anyway to determine why they 4 records were not included in the query?

Thank you!
Vega
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Do you have a primary key field with a unique identifier? Do the four records have a value in this field that already exists in your table?
 
Upvote 0
Do you have a primary key field with a unique identifier? Do the four records have a value in this field that already exists in your table?

Yes, they are already in the table. But they are different records, with different information. Is there no way to include them?
 
Upvote 0
The Error occur due to three reasons:

1. You have a foreign key field and have set up the relationship to the parent table and enforced the relationship then if there is a value in the foreign key field that does not match any value in the parent tables primary key.


2. If your table has a primary key field (that is not an autonumber field) and you did not supply a unique value for the field in each record.

3. An field with index that is unique that is not be supplied with unique values for each record.
 
Upvote 0
Yes, they are already in the table. But they are different records, with different information. Is there no way to include them?

If they are different records why do they share a primary key? They should have their own, unique keys -- that is the whole pint of a primary key: a unique identifier for a record in a table. Give the new records new keys (you may need to adjust foreign keys in related tables, if any are likely to be affected) and import them.

Denis
 
Upvote 0
Thank you, Everyone! This information has really helped. I mistakenly created a Primary Key using a non-unique field of information. I've gone back to the design and updated my database.

I appreciate the help!

Erica
 
Upvote 0

Forum statistics

Threads
1,215,360
Messages
6,124,491
Members
449,166
Latest member
hokjock

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top