Autonumber Re-use

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form that uses an auto number and a command button that should
cancel the entry if there is a user error (if user initiated a record by
mistake and needs to clear it). I need this command button (ran by a macro)
to not save the mistakenly entered record, and reuse this number instead of
going on to the next number. I want the table to show all consecutive
numbers, no missed numbers.
 
Adriana,

If consecutive numbers with no gaps is important, then an Autonumber
field is not applicable. Change it to a Number data type, and in the
Default Value property of the control on your form, put the equivalent
of this...
DMax("[NameOfYourField]","NameOfYourTable")+1
 
Back
Top