DMAX in multi-user environment

F

fpc001

Access 2003
I want to assign the next sequential number to a field (I can't use
autonumber since I already have an autonumber in this table)
I read about dmax but always in conjunction with single user environment,
can I use it in multi user environment?

Any help would be greatly appreciated:)
Fran
 
R

Rick Brandt

fpc001 said:
Access 2003
I want to assign the next sequential number to a field (I can't use
autonumber since I already have an autonumber in this table)
I read about dmax but always in conjunction with single user environment,
can I use it in multi user environment?

Any help would be greatly appreciated:)
Fran

It depends on what event you use it in. The BeforeUpdate event of the form is
the only event that ends with a commit to disk so there are only fractions of a
second between the calculation of the DMax() value and the saving of the record.

Using DMax() as a default value or in any other event greatly increases the odds
that multiple users will grab the same value.
 

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

Top