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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Paste Table having AutoNumber Primary Key 1

Status
Not open for further replies.

ShabanaHafiz

Programmer
Jun 29, 2003
72
PK
I am using Microsoft Office Access 2003.

I have two copies of the same database. These are mde files. Two offices have entered data in these files. I have to merge this data in a single mde file.

I thought to copy table from db2.mde and paste it in db1.mde with Paste Option as Append Data to Existing Table. The problem is that some tables have AutoNumber fields as Primary Key. When I try to append data to these tables, I get the error:

Records were lost due to key violations.

We have received database from another organization and we cannot make any design change. However numbering sequence generated by AutoNumber is immaterial.

 
The best thing is an Append query that does not include the autonumber fields.

You can also paste by choosing columns, rather than rows to paste, do not select the autonumber field. Hide the autonumber column for the table you wish to paste into before choosing paste append.

Finally, you can change the autonumber fields field type to 'Number', or you can delete them.

All these methods mean that you will lose the relevance of, at the very least, a chunk of autonumbers.
 
Thanks Remou.

Append query helped a lot in merging control table values. But we had to re-enter details of smaller database again because re-arrangement of autonumbers disturbed the description of identifiers.

In any case, it reduced the manual work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top