Jim said:
autonumber skips - Any idea how to correct a problem that
we have been experiencing with the autonumber feature.
This problem has been sporatic.
This is NOT a problem.
The only thing an autonember primary key guarantees is
uniqueness! It will almost certainly skip numbers (when
you start to create a new record and use Esc to undo it or
just simply delete a record. Autonumber values can go
negative, become random or, if you use replication, not even
be a number.
If you have a requirement for a sequential number, then you
have to provide your own mechanism to produce them,
AutoNumber is intended strictly for the purpose of
generating an internal table primary key that can
conveniently be used as foreign keys in relationships
between tables.
Depending on how your application is being used, there are
various ways to to generate sequential numbers that can be
used by humans. The simplest way that will work in a single
user database is to set the number field in a form's Before
Update event:
Me!thefield = Nz(DMax("thefield", "thetable"), 0) + 1