Sequencial Numbering without using Autonumber

  • Thread starter Thread starter Evan McCutchen
  • Start date Start date
E

Evan McCutchen

Hello,

How is it that I can make a table have a sequencial number without using an
autonumber?

Thanks,
Evan M.
evan AT radiologyonesource DOT com
 
You'd have to write your own function. The DMAX domain aggregate function
can be used to retrieve the highest value stored in the field, you'd
increment it, use it as your sequential number, and save it. Then, the next
DMAX would pick _that_one up as the highest. This should only run into
problems, perhaps, if you have multiple users adding new records
concurrently.

Larry Linson
Microsoft Access MVP
 
Larry,
How is it that i go about incrementing the number in the field? My code now
is:

txtNewID.Value = DMax("ANewID", "tblNumbersDONE") + 1

This does increase the value in the ID field, but doesn't increase the value
of the number in the field of the table.

Thanks,
Evan M.
evan AT radiologyonesource DOT com
 
Nevermind... memory lapse. I've got it now. :)

Evan McCutchen said:
Larry,
How is it that i go about incrementing the number in the field? My code now
is:

txtNewID.Value = DMax("ANewID", "tblNumbersDONE") + 1

This does increase the value in the ID field, but doesn't increase the value
of the number in the field of the table.

Thanks,
Evan M.
evan AT radiologyonesource DOT com
 
Back
Top