Replace Autonumber(ed) record

PaulW
2StarLounger
Posts: 125
Joined: 17 Feb 2010, 16:25

Replace Autonumber(ed) record

Post by PaulW »

My user, in his infinite wisdom, after many warnings about why he should not delete records, has seen fit to have someone on his staff delete records where the autonumber field is used as a foreign key.

I have the records in a backup of my data.mdb, is there any way I can import only some records from the old mdb into the current mdb to get those autonumbered records "restored"?

TIA
PaulW
Lost Wages, NV USA
(former Cobol Programmer)

User avatar
HansV
Administrator
Posts: 78415
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Replace Autonumber(ed) record

Post by HansV »

If you create an append query and include the AutoNumber field, you can add the records from the backup table to the production table while preserving the AutoNumber values.

BTW, if you set Enforce Referential Integrity for a relationship, users won't be able to delete "parent" records as long as there are "child" records, so that it's impossible to leave "orphans".
S0134.png
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans

PaulW
2StarLounger
Posts: 125
Joined: 17 Feb 2010, 16:25

Re: Replace Autonumber(ed) record

Post by PaulW »

Hans,

Again thank you so much. I did not use referential integrity because I didn't trust Access 2003 when I wrote the system.
PaulW
Lost Wages, NV USA
(former Cobol Programmer)