Autonumber lost its sequence.

  • Thread starter Thread starter fofikos
  • Start date Start date
F

fofikos

I created a database for a certification authority meaning that all
certificates must have a continuous numbering.

My client reported that today the database skiped two numbers up than it
should; I suspect that the client created the records and deleted them, but
the form does not allow deletion of records! And there is no other way to
input to that table (unless intentionaly).

Any idea what else could cause that?
What can i do to reuse these two numbers?


THANKS
Vasilis
 
Vasili,

Deletion of records directly in the table is a possibility, though not
necessarily the only one. The important thing here is that, due to the
nature of autonumber, it is not suitable for cases like yours where you
require sequential numbering. Since all data entry is done through a
form, a more appropriate way would be to use a number field instead, and
make use of the Default Value property of the control bound to it on
the form to calculate the next number by means of an expression like:
DMax("[ID_Field]","Tablename") + 1
Note that the control should be disabled (if not hidden) so the user
can't change the number.

HTH,
Nikos
 
When you *begin* adding a record, Access assigns the next available
autonumber.

If you then press <Esc> twice, it aborts the entry of the record. But the
number has already been assigned, and it will not be assigned again. This is
a very common scenario.
 
Back
Top