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

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

Arvin Meyer [MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top