Autonumber probs

Kieran

Learn learn learn..Forget
Local time
Today, 09:51
Joined
Jul 16, 2002
Messages
23
I have an autonumber field in one of my tables. It is the primary key. I've been finding that it skips numbers every now and then. Is there any reason for this? Or any way of fixing this??


Thanks

Kieran
 
Kieran

There are reasons that gaps may appear from time to time.

The most obvious one is that records may be deleted.

The less obvious reason is that Access generates this number before a row is actually inserted into a table. It is possible for Access to generate a number that is never actually used because the user cancelled the save action prior to the row actually being added to the table. The pre-assigned number must be discarded. This is done to avoid potential duplicates when the database is in use by multiple users.

Don’t get hung up on the fact that there may be occasional gaps in the Autonumber sequence. The primary key of a table does not need to be sequential. It only needs to be unique.

HTH

Graham
 
thanks

yeah i thought thats what it was, i just wasn't sure and was just wondering for peace of mind.........thanks for the help.

i realise about deleted records though....he he

regards,

Kieran
 

Users who are viewing this thread

Back
Top Bottom