Sequencial Numbering without using Autonumber

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
 
L

Larry Linson

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
 
E

Evan McCutchen

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
 
E

Evan McCutchen

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top