Field locking

temacc

New member
Local time
Today, 21:08
Joined
Jul 11, 2002
Messages
6
Hi,

I have a database being used by multiple users which was working fine. Recently two users entered new records into the database at the same time, the data saved however the code generates a license # and both users happened to get the same license number. Is there a way to lock a field/table until one user has gotten the last license number and added to it so the next record entered will get the next sequential number??

Thanks
 
would you have any code examples of the pessimistic locking for a field?
 
No code is required. The Record Locks property of the Form determines how records are handled. Go into Design View of your form, select Properties, highlight the Records Lock item and press F1 for help on setting the correct choice.
 
I'm not so much concerned with record locks, rather with locking a field! These are new records being entered so the data is fine, however when the user clicks a picklist to approve a license, code is triggered to get the max number in the database and add to it to produce a new license number but if too people are doing this at the same time and don't save immediatley after they get their new number then they'll end up with the same license number.

Any ideas how to keep the license numbers unique?

thanks
 

Users who are viewing this thread

Back
Top Bottom