Share via

Runtime Error '3188'

Anonymous
2017-04-26T20:23:37+00:00

The error message states "Could not update; currently locked by another session on this machine" 

I have no idea why i'm getting this error, I've looked online and have tried Me.Dirty=False and also setting the open record set to nothing. 

Any help would be greatly appreciated!

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Anonymous
    2017-04-26T21:43:15+00:00

    What's the context? What are you doing when the error appears? If it's a Macro could you post the steps, or if it's VBA code, post the code.

    One way this can happen is that you have a Form open, bound to a Table, and you're trying to run an Update query changing that same table. The "other session" is YOU. Or if you have a multiuser setup it may actually be another user. More info please!

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2017-04-27T13:22:23+00:00

    This code is located in a forum, once a checkbox is unchecked then the code executes. Also I am the only one with access to this program, so there aren't any other users. 

    Private Sub gotoRightAdd(hellomyman As String)

    '----------------------------------------------------------

    ' a procedure used for the checkADDInspection method

    ' to go to the specific addition

    '----------------------------------------------------------

        Dim str As String, rs As DAO.Recordset

        str = "select * from box_additions where [add_number_in_list]=" & Me.AC_ID_IN_LIST.Value & ";"

        Set rs = CurrentDb.OpenRecordset(str)

        If rs.EOF And rs.BOF Then

            Exit Sub

        End If

        rs.MoveFirst

        DoCmd.SelectObject acForm, "List_Information_frm"

        Forms!List_Information_frm!ADDITIONS_MAIN_frm!AC_Box_Additions_frm.SetFocus

        DoCmd.GoToRecord , , acFirst

        Do Until rs.EOF

            If rs.Fields("add_number") = hellomyman Then

                Exit Do

            End If

            DoCmd.GoToRecord , , acNadd

            rs.MoveNadd

        Loop

      rs.Close

    End Sub

    Private Sub uncheckALLAdd(whatsup As Integer)

    '----------------------------------------------------------

    ' used for the checkAddInspection method

    ' to uncheck all additions related to the add. no.

    '----------------------------------------------------------

        Dim str As String, rs As DAO.Recordset

        str = "select * from box_additions WHERE [add_NUMBER_IN_LIST]=" & Me.AC_ID_IN_LIST.Value & ";"

        Set rs = CurrentDb.OpenRecordset(str)

        If rs.EOF And rs.BOF Then

        Else

            rs.MoveFirst

            Do Until rs.EOF

                'MsgBox rs.Fields("add_number")

                rs.Edit

                rs.Fields("ReadyForInspection") = whatsup

                rs.Update

                rs.MoveNadd

            Loop

        End If

        Set rs = Nothing

        rs.Close

    End Sub

    Was this answer helpful?

    0 comments No comments