Autonumber and record adding abounding

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

Guest

In a table, I need a field as a counter of each record, unique, sequential
and sorted by the sequence of data entry of each record; the field by
autonumber format is a good idea, BUT at the time of adding a new record if I
press ESC key (abounding of adding a new record), of course the new record
isn’t added but MyID will grow one number and next time when I add new
record, MyID has one number more than records quantity, as it is unwanted.
(id est: MyID is “abounding times of adding records†more than records
quantities). How can I solve this problem at direct data entry of the table
or in a form?
Thanks
A.NIAKI
 
A. Niaki,

You can use a Number data type field, and in the data entry form set the
Default Value for this field to the equivalent of...
DMax("[MyID]","NameOfYourTable")+1

But this won't help if you delete an existing record from the table, in
which case that record's ID number will be "missing" from the sequence,
and the highest ID number will again be greater than the number of records.

So if this will be a problem, I guess the main question here is "why?"
What is the purpose of this sequential counter?
 
Back
Top