Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Append Query Error

Status
Not open for further replies.

Cordury

Technical User
Jun 2, 2003
147
US
Background- 3 tables populate a form and two subforms. I attempted to use an Append Query to dump all of the data into a Master table. The primary key is "StoreNum" and it is spelled the same on all 3 tables used in the query.

When I run the query, I receive the following Error:

"Microsoft Access can't Appened all the recoreds in the Append query.

Microsoft Access set 0 field(s) to Null due to a type conversion failure, and it did not add 463 recored(s) to the table due to key violations, 0 record(s) due to lock violations, and 0 record(s) due to validation rule violations.
Do you want to run the action query anyway?"

A little more background- One table that populates 2 fields in the form is linked to an Excel file.

There are a good deal of fields that have not been populated as of yet. The query does return some data but not all.

Any ideas would be appreicated.
Thanks,
Cord
 
Check you master table...at least one of the fields can't have duplicates (the primary key is definitely one, there might be more). Basically the append query is trying to append duplicates into that field and you can't do that. Hope that helps.

Kevin
 
Kevin,
Thanks for the quick response. One of the tables does have duplicates in the key field....

That's got to be it.

SHOOT! This is (ideally) a db that houses info on store locations. The Store # could be in a table twice bc when there is construction, the store is moved temporarily to a "TEMP" location then moved to the New Location or back to the original after the construction is completed.


Thanks Anyway!-
 
So if I remove the primary key from that table and allow duplicates the query should work?
 
Short answer, yes. I'm not sure what that will do to the rest of your database (as far as data integrity), but it will make your query work.
 
I was afraid you were going to say that!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top