The following code lists users who are logged on an to an Access backend by reading the laccdb file. In pre 2007 versions this code used to be known as the famous LDB viewer. For Access 2010 I rewrote the code as LDB viewer for Access 2010.

Sub LDBViewer2010()
'Reference Microsoft ActiveX Data Objects for this code to work

Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Const conDatabase as String = "c:\sample.accdb"

    ' Open connection to Access backend
   cn.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & conDatabase & ";Persist Security Info=False;"

    ' Open recordset
   Set rs = cn.OpenSchema(adSchemaProviderSpecific, , "{947bb102-5d43-11d1-bdbf-00c04fb92675}")

    'Output the field list
   Debug.Print rs.Fields(0).Name, "|", rs.Fields(1).Name, "|", rs.Fields(2).Name, "|", rs.Fields(3).Name

    'Loop through users recordset of users in database.
   While Not rs.EOF
        Debug.Print Trim(rs.Fields(0)), "|", Trim(rs.Fields(1)), "|", Trim(rs.Fields(2)), "|", Trim(rs.Fields(3))
        rs.MoveNext
    Wend

    ' Close
   If rs.State <> adStateClosed Then rs.Close
    Set rs = Nothing
    Set cn = Nothing
   
End Sub