checking whether records are locked or not (1 Viewer)

radek225

Registered User.
Local time
Today, 05:24
Joined
Apr 4, 2013
Messages
307
Is there any possibilities to check before Currentdb.execute or editing record in recordset, whether record is locked by another user?
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 13:24
Joined
Sep 12, 2006
Messages
15,679
are you using pessimistic locking?

if not, they aren't locked, although that doesn't mean another user may not have edited it, and not completed the edit - in which case you get the "another user ..." message. Sometimes the other user is yourself, and you have the same record open in 2 forms, and it is a design issue, not a data issue.

note that you can error trap both the codes you mention.
 

radek225

Registered User.
Local time
Today, 05:24
Joined
Apr 4, 2013
Messages
307
are you using pessimistic locking?

if not, they aren't locked, although that doesn't mean another user may not have edited it, and not completed the edit - in which case you get the "another user ..." message. Sometimes the other user is yourself, and you have the same record open in 2 forms, and it is a design issue, not a data issue.

note that you can error trap both the codes you mention.

Another PC can locked record, I woudl like to check it before runnig my code. I know problem when the other user it's me but it not apply to this situation
 

Users who are viewing this thread

Top Bottom