Deleting a record (1 Viewer)

northernbreaks

Registered User.
Local time
Today, 23:40
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
 

ScottGem

Registered User.
Local time
Today, 19:40
Joined
Jun 20, 2005
Messages
1,119
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.
 

northernbreaks

Registered User.
Local time
Today, 23:40
Joined
Sep 5, 2005
Messages
19
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:

ScottGem

Registered User.
Local time
Today, 19:40
Joined
Jun 20, 2005
Messages
1,119
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.
 

bobburg

Registered User.
Local time
Today, 18:40
Joined
Apr 18, 2005
Messages
18
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

Top Bottom