append query and relationships

  • Thread starter Thread starter Rover
  • Start date Start date
R

Rover

I have a non keyed temp invoice table (tbl_tmp_inv). I am trying to
append all the records to a keyed invoice table (tbl_inv). Under
"Relationships" the tbl_inv is linked to tbl_paymnts and tbl_log. I
have cleared tbl_inv tbl_payments and tbl_log and run an append query,
appending all tbl_tmp_inv into tbl_inv. It doesn't work. I get a
warning that 22 (of 87) records can't be added due to key violations.
All invoice numbers (the key) are unique. Further, if I create a new
database and import the two tables and the query, IT WORKS FINE!! So...
What in the relationship is causing the problem? I've checked all
associated tables and can find nothing wrong. What am I missing?
 
View the relationships again. Delete the relationships between tbl_inv
and the other tables.

Run the query again. I think that it will work. I don't believe that it
is the primary key that bunged up the query's execution--it was likely a
foreign key whose parent didn't exist. After you run the query, try to
put the relationships back between tbl_inv and the others. One or more
of them is likely to spit out an error. A quick join of the offending
relationship should show what doesn't exist.

Doug
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top