replacing deleted records

M

mcclendon

I have deleted four records by accident from my table and
want to replace them with their respective deleted record
number. My primary key is set to Auto ID. How can this be
done?
 
T

TC

I assume you mean "autonumber" (not Auto ID)?

If you have deleted some records in the middle of the autonumber range, you
could maybe get them back like this:

1. Copy into a new table, all the records with autonumbers less than the 4
you deleted.
2. Re-add the 4 deleted records.
3. Append the rest of the numbers.
4. Replace the old table with the new one.

But you should really not be assigning any importance or significance to the
value of an autonumber. (IOW, it should not matter if some of the values do
not exist.) You do know that there is no guarantee that they will be
sequential? (1, 2, 3, 4 etc.). If the user starts typing a new record, but
then ESCapes it without saving it, then repeats that process a few times,
the autonumber will increase, so no saved records will actually get those
numbers.

HTH,
TC
 

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