Hi,
Using ADO you can create a recordset of users:
Dim intUsers As Integer
Dim rst As ADODB.Recordset
Const JET_SCHEMA_USERROSTER = "{947bb102-5d43-11d1-bdbf-00c04fb92675}"
Set rst = CurrentProject.Connection.OpenSchema( _
adSchemaProviderSpecific, , JET_SCHEMA_USERROSTER)
If rst.EOF Or rst.BOF Then
Else
rst.MoveFirst
End If
Do Until rst.EOF
intUsers = intUsers + 1
Debug.Print rst![LOGIN_NAME]
Debug.Print rst![COMPUTER_NAME]
rst.MoveNext
Loop
rst.Close
Set rst = Nothing
MsgBox "Users: " & intUsers, vbInformation, "Done"
The User Recorset contain the following fields:
COMPUTER_NAME
LOGIN_NAME
CONNECTED
SUSPECT_STATE
HTH
--
Cheers
Mark
Free Access/Office Add-Ins at:
http://mphillipson.users.btopenworld.com/