Lock File Problem - 2007

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • johnvonc@earthlink.net

    Lock File Problem - 2007

    I'm working on an Access 2007 db, and we are unable to modify db
    objects, as it says other users are logged in. There is no one logged
    in, although the lock file shows 3-4 users. Any suggestions on
    correcting this?

    John
  • timmg

    #2
    Re: Lock File Problem - 2007

    On Apr 23, 2:58 pm, johnv...@earthl ink.net wrote:
    I'm working on an Access 2007 db, and we are unable to modify db
    objects, as it says other users are logged in. There is no one logged
    in, although the lock file shows 3-4 users. Any suggestions on
    correcting this?
    >
    John
    Could you have multiple instances of Access running? That's my
    favorite gotcha.

    I use the following code on a form with a listbox lboconnections and
    buttons to close and refresh. A nice way to see which machine in
    using the system.

    Private Sub ListConnections ()
    Dim cnn As ADODB.Connectio n
    Dim rst As ADODB.Recordset
    Dim strComputerName As String

    Set cnn = CurrentProject. Connection
    Set rst = cnn.OpenSchema( adSchemaProvide rSpecific, , _
    "{947bb102-5d43-11d1-bdbf-00c04fb92675}")
    lboConnections. RowSource = vbNullString
    lboConnections. AddItem "Computer Name;Login Name"

    Do While Not rst.EOF
    If rst("Connected" ) Then
    strComputerName = rst("Computer_N ame")
    lboConnections. AddItem _
    Left(strCompute rName, _
    InStr(strComput erName, vbNullChar) - 1) & _
    ";" & rst("Login_Name ")
    End If
    rst.MoveNext
    Loop
    rst.Close
    Set rst = Nothing
    Set cnn = Nothing
    End Sub

    Comment

    • johnvonc@earthlink.net

      #3
      Re: Lock File Problem - 2007

      On Apr 23, 1:44 pm, timmg <tmillsgronin.. .@gmail.comwrot e:
      On Apr 23, 2:58 pm, johnv...@earthl ink.net wrote:
      >
      I'm working on an Access 2007 db, and we are unable to modify db
      objects, as it says other users are logged in. There is no one logged
      in, although the lock file shows 3-4 users. Any suggestions on
      correcting this?
      >
      John
      >
      Could you have multiple instances of Access running?  That's my
      favorite gotcha.
      >
      I use the following code on a form with a listbox lboconnections and
      buttons to close and refresh.  A nice way to see which machine in
      using the system.
      >
      Private Sub ListConnections ()
          Dim cnn As ADODB.Connectio n
          Dim rst As ADODB.Recordset
          Dim strComputerName As String
      >
          Set cnn = CurrentProject. Connection
          Set rst = cnn.OpenSchema( adSchemaProvide rSpecific, , _
           "{947bb102-5d43-11d1-bdbf-00c04fb92675}")
          lboConnections. RowSource = vbNullString
          lboConnections. AddItem "Computer Name;Login Name"
      >
          Do While Not rst.EOF
              If rst("Connected" ) Then
                  strComputerName = rst("Computer_N ame")
                  lboConnections. AddItem _
                   Left(strCompute rName, _
                   InStr(strComput erName, vbNullChar) - 1) & _
                   ";" & rst("Login_Name ")
              End If
              rst.MoveNext
          Loop
          rst.Close
          Set rst = Nothing
          Set cnn = Nothing
      End Sub
      Excellent! I'll give it a try!

      Comment

      Working...