Import into a table with an autonumber

G

Guest

I am new to access and need to import a table into another table that has an
autonumber setup. I keep on getting errors that Microsoft Access was unable
to append all the data to the table. Reason was due to lost to key violation
and it give some example reasons.

What is the best way to dump information into a table that already has
autonumber setup?
 
J

Jeff Boyce

You didn't say whether you were trying to append to the autonumber field,
but given that error message, I'm guessing you are trying to take records
from one table that has an ID field and append them (and their ID field) to
another table that has an autonumber primary key/ID field. As soon as one
of your incoming records has the same ID# as an existing record in the
autonumber table, you'll get this message.

But more dangerously, you will be able to append some of your records
without ever realizing that the primary key/ID field now can contain
questionable data.

Why do you feel you need to append to the key field? (Or have I totally
misunderstood?)

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

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

Top