Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CurrentRecord Locked?

Status
Not open for further replies.

rarich01

Programmer
Oct 22, 2001
14
0
0
US
How can I obtain from Accesss whether the current record on a form is locked or not?

BackGround:
I designed a form that allows a user to edit the data in a particular table, with the form's RecordLocks property set to 'Edited Record'. The database that contains this form will be placed within a multiuser environment, serving as the front end, while another DB will serve as the backend.

Let's say that users 1 & 2 both have the form opened, and both are on the same record. Then, user 1 begins editing that record. If user 2 then wants to also edit the record, Access won't allow user 2 to edit the record, which is fine.

However, while user 2 is waiting for the lock to be released, he has no way of knowing it's locked. It will just appear like the screen has been frozen. If there was a way for me to obtain from Access whether or not the current record is locked, then I could use the form's 'On KeyPress' event to check for this, and then provide the user with the proper message if the record is indeed locked.

Any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top