On Apr 23, 2:58*pm, johnv...@earthlink.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.Connection
Dim rst As ADODB.Recordset
Dim strComputerName As String
Set cnn = CurrentProject.Connection
Set rst = cnn.OpenSchema(adSchemaProviderSpecific, , _
"{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_Name")
lboConnections.AddItem _
Left(strComputerName, _
InStr(strComputerName, vbNullChar) - 1) & _
";" & rst("Login_Name")
End If
rst.MoveNext
Loop
rst.Close
Set rst = Nothing
Set cnn = Nothing
End Sub