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??
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.