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?
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?