Deleting a record

northernbreaks

Registered User.
Local time
Today, 19:25
Joined
Sep 5, 2005
Messages
19
If you delete a record, the auto number is deleted but the following number remains unchanged e.g. 1 2 4 5 6 (Record 3 deleted). How can you rebuild a table so the auto number remain sequential. Using Access 2003

Dave
 
northernbreaks said:
If you delete a record, the auto number is deleted but the following number remains unchanged e.g. 1 2 4 5 6 (Record 3 deleted). How can you rebuild a table so the auto number remain sequential. Using Access 2003

Dave

Why would you need to? The SOLE purpose of an autonumber is to provide a unique identifier to a record. It shouldn't matter whether there are gaps or not. Especially if you have related tables, you do not want to change the autonumber or you will create orphans.
 
Record deletion

Hi Scott

I have been typing in some test data manually into the table and have not setup any relationships as yet. So the table is not linked to anything, however I deleted a record. Just thought there may be a way of tyding up the record number.



Dave
 
Last edited:
You miss my point. The autonumber is NOT a record number. Its only a unique Identifier. It does not matter what the value is as long as its unique.
 
northernbreaks said:
If you delete a record, the auto number is deleted but the following number remains unchanged e.g. 1 2 4 5 6 (Record 3 deleted). How can you rebuild a table so the auto number remain sequential. Using Access 2003

Dave
Dave,
Scott is right. The autonumber is only a unique identifier. If you want to clean the data base and start from the beginning, delete all the records and go to tools/data base utilities/compact and repair. It will start your auto numbers at 1 again.
 

Users who are viewing this thread

Back
Top Bottom