How do I reset Autonumber??

raychoy2k

Registered User.
Local time
Today, 16:23
Joined
Feb 24, 2003
Messages
29
Hello,

I am using the autonumber type in my table. I have accidentally deleted a few records, but would like to sequencially continue the autonumbering. However, Access just continues from where it left off. I would like to reset the autonumber back to 1. How do I do that?
 
Just curious, Is it important that your autonumber field be sequential?

If it is used as a Primary Key, then it shouldn't matter as the primary key should be meaningless and used only to identify unique records.

If it isn't a primary key, what is it used for? Is it used any any calculations? Or comparisons?
 
You don't have to delete ALL the records. If you compact the database, it will start from the greatest autonumber.
 
Thanks but no help yet.

Let me try to be more clear. I only want one of my tables to be reset to 1. I can remove all records if thats necessary. It is a autonumber data type and it is the primary key.

I am storing customer ID with autonumber sequentially. But for some reason, it is starting at 9. I would like it to start back at 1. If I compact the database, will it affect the other tables?
 
Do as Rich mentioned and remove all records. Then compact the database. This will cause the table to start again at 1.
 
The effect it will have on the other tables is that it will reset all their autonumbers to the next available number. So if you have an empty table, the next available number is 1. If you have a table that has 2059 as the highest autonumber value being used, it will set the next available number to 2060.
 

Users who are viewing this thread

Back
Top Bottom