finding out if a record is locked by another user (1 Viewer)

pauly

Registered User.
Local time
Today, 15:40
Joined
Jul 8, 2002
Messages
49
Is there a way if you can find out if a record is open, and therefore locked by another user, in a multiuser environment? I want to find out this so i can display a message to the user that the record is locked and they cant edit it until the other user is finished with it
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 09:40
Joined
Feb 28, 2001
Messages
27,322
As long as you are talking about Access, you don't have record locking anyway. You have buffer (block) locking.

The problem is identifying the record in question ahead of time. Unless you mark the record or place a mark in a separate locking table to indicate your interest, I don't think you can tell ahead of time. What you MIGHT be able to do is trap the error that follows the attempt to update a locked record so that you can do a reasonable recovery from the situation. Requires VBA code in the OnError event, but it is doable.
 

pauly

Registered User.
Local time
Today, 15:40
Joined
Jul 8, 2002
Messages
49
Ok The_Doc_Man, the reason that i want to find out if a record is locked is because on my database, when a nother user is editing a record that i have open, there is no warning that the reason why the record becomes locked is because someone else is editing. Access Help says that a record lock symbol will be displayed, but this doesnt happen for some reaosn, so i want to find out if it is locked so that i can give them a warning
 

Users who are viewing this thread

Top Bottom