ktritten said:
I have a problem where 4 records were deleted and now the
auto assign number does not match the record # (example:
record 634 of 640 when ideally it should be the same).
Is there a way to fix this?
It's not broken. "Record numbers" are meaningless in Access, and
autonumbers exist for the sole purpose of generating a unique key for a
record. The value of an autonumber should never be used to mean
anything. Autonumbers, by their very nature, will develop gaps in the
sequence whenever a record is deleted, or when a user begins to create a
new record and then decides not to save it.
Most often, autonumbers shouldn't be shown to the users at all (though I
have been known to do it, just to give the users a handle to identify a
record that wasn't otherwise easy to single out). But if you care
whether the autonumbers have gaps, then you are already assigning them
more meaning than you ought.
In a relational database, records are can be presented in any requested
sequence, but have no inherent sequence of their own; hence, record
numbers are meaningless. If your application requires a sequential
number for external reasons -- an invoice number, for example -- then
you should use some other mechanism to generate those numbers so that no
gaps will develop.