check if someone is changing a record while I want to change the s

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I check in my access project (with a macro) that there is no other
user changing the record before I want to change it?
 
A lock is placed on a record when it is being changed, you cannot change it
(and often the page or table that contains that record). There is no way
that I know of to check for that lock with a macro. With VBA you can attempt
the change and report back if it fails. I use error handleing to do this,
something like:

If Err = 3158 Then ' Record is locked
MsgBox "Another user editing this record"
End If
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
Back
Top