Resetting Autonumbers

robthedog

Registered User.
Local time
Today, 15:02
Joined
Jan 3, 2004
Messages
40
According to Access help re. Compacting a database:

“in an Access database, if you have deleted records from the end of a table that has an AutoNumber field, compacting the database resets the AutoNumber value; the AutoNumber value of the next record you add will be one greater than the AutoNumber value of the last undeleted record in the table.”

This doesn’t seem to make sense to me, as an autonumber should be unique, nor can I get an autonumber field to reset by compacting the database anyway.

Any suggestions!
:confused:
 
Plain English translation:

You have an autonumber field in your database, and let's say you have 10 records in your database assigned the autonumbers 1....10. Let's say you delete the last 5 records. If you do not compact the database at that point, the next new record will be assigned autonumber 11. If you do compact the database, the next new record will be assigned autonumber 6.

Now let's say you have the same scenario with 10 records in your database. If you delete the record assigned autonumber 2, whether or not you compact the database, new records will be assigned autonumbers starting at 11.

Is this not happening when you compact the database?
 
Re autonumber / compacting

Thanks for your response, and your translation! This is basically how I interpreted it, but I’ve experimented over again using office 2000 and XP and still can’t get the autonumber to reset.

(PS This isn’t something that’s critical, but it’s just bugging me that I can’t get it to work)

Ta

Rob
 

Users who are viewing this thread

Back
Top Bottom