Speed at which Error 3218 Could not update currently locked is tri

N

N. Cotton

I currently use pessimistic record locking and test if the record is
currently locked using the following code.

If the record is not locked the function returns instantaneously. However,
if the record is locked the time taken to trigger error 3218 is around 5
seconds. Is there a way to reduce the speed it takes to test if the record is
locked?


Public Function IsRecordLocked(rs As Recordset) As Boolean
'Returns True if the record is locked for editing by another user
'rs = testing reecordset

IsRecordLocked = False

With rs
On Error GoTo Err_Lock
.Edit
.Update
On Error GoTo 0

End With

Exit Function

Err_Lock:
IsRecordLocked = True
Resume Next

End Function
 

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