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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you know if a record is locked?

Status
Not open for further replies.

Jedi420

Programmer
Jun 21, 2002
184
US
In Access 2000, how would one go about (through code) finding out that the record they are on is currently locked so that I can show my user some kind of msg box to let them know that trying to edit the form is useless at the current moment?? And also, how (throug code) would I find out that the lock is gone? Any help would be greatly appreciated.

-Jedi420

A man who has risked his life knows that careers are worthless, and a man who will not risk his career has a worthless life.
 
To find out when the record is lock or gone, at the form level

Put this in the on_current event of the form

If Me.AllowEdits = True Then
msgbox "current record is editable"
Else
msgbox "trying to edit this record is useless at the current moment "
End If
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top