Autonumber problem

ainstien

New member
Local time
Today, 09:07
Joined
Jul 14, 2013
Messages
4
Hi,

I have been having problems with the autonumber function for the tables.. I want the record numbers to be autonumbered.. but if i delete one of the records in between it does not automatically change the rest of the record numbers...
In my database,

I have the records like these:

1
2
3
7
8
9

Anyway, to fix these so they will follow the order?
 
No (easy) way to fix that. And no need.
In fact, if you remove all records from a table, then you Compact the database, the autonumber will be reset and will start from one. But ONLY if the table is empty.
 
Why do they need to be consecutively ordered? The correct answer is they don't need to be consecutively ordered. Any other answer and you either don't understand the purpose of an autonumber or you've set up your database incorrectly.

All an autonumber primary key should be used for is to have a field that allows you to uniquely reference a specific record in a table. If you've used it in another manner in which its consecutiveness is needed, then you need to restructure your database so that field isn't used for such.
 

Users who are viewing this thread

Back
Top Bottom