Rabu, 24 April 2019

[MS_AccessPros] Check is records is locked

 

Hi, I found this sub:


Public Function fnIsLocked(frm As Form) As Boolean


    On Error GoTo ProcError

    

    fnIsLocked = True

    

    With frm.RecordsetClone

        .Bookmark = frm.Bookmark

        .Edit

        .CancelUpdate

        fnIsLocked = False

    End With

    

ProcExit:

    Exit Function

ProcError:

    If Err.number = 3218 Then

        'Record is locked'

    Else

        MsgBox Err.number & vbCrLf & Err.Description, vbOKOnly, "error in IsLocked"

    End If

    Resume ProcExit

End Function


is the best way to determine if a record is locked?


Thanks 

Domenico

__._,_.___

Posted by: domcoz@gmail.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


SPONSORED LINKS
.

__,_._,___

Tidak ada komentar:

Posting Komentar