Detect Current Record Locking

G

Guest

I'm working on an Access 2000 split DB with record-level locking. There will
be approximately 10 users in this DB, and they will be editing existing data
(via a bound form).

Here's what I want to happen:

Person 1 opens the bound form. Let's say it opens to record #1. As I
understand it, record #1 is now locked, and will remain so until Person 1
moves to a new record.

Person 2 opens the bound form (on his local copy of the front-end). Because
record #1 is locked, it opens to record #2.

Here's what's currently happening:

When everyone who opens the form starts out at record #1. Granted, only one
person can edit it, but they all can see it.

To the best of my figuring, if I can find out via VBA whether the current
record is locked, I can automatically move users to the first non-locked
record. I'd like to do something like this -

Private Sub Form_Current()

Do Until Me.CurrentRecordLocked = False

DoCmd.GoToRecord , ,acNext

Loop

End Sub

I just need some way to approximate "Me.CurrentRecordLocked".

Any help would be great. Thanks.
 
A

Alex Dybenko

Hi,
AFAIK - you can either lock all records, or edited record.

to check if some record is locked - you can open a recordset, and try to
lock this error. if error - then record is locked
 

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