Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Paste Table having AutoNumber Primary Key

Paste Table having AutoNumber Primary Key

Paste Table having AutoNumber Primary Key

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.

RE: Paste Table having AutoNumber Primary Key

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.

RE: Paste Table having AutoNumber Primary Key

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close