Verify whether a record is currently locked

G

Guest

In a multi-user environment, Access knows when a record is locked and shows
the icon in the record selector on the form.
I don't want my form to show the record selector.
Is there any way with VBA that I can verify whether the record is currently
locked, ie being edited by another user.
Help much appreciated. I posted this under access.modulesdaovby but got no
response.
 
B

Brendan Reynolds

To the best of my knowledge, the only way is to attempt to lock the record,
and trap the error that will be raised if it is already locked.

The best source of information I know for this whole area of record locking
and concurrency issues is the Access 2000 Developer's Handbook (presumably
also the 2002 edition, but I don't have that edition), Volume II, Enterprise
Edition. Lot's of other good stuff in there too.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 

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