Assuming Access 2000 or later, take a look at:
http://support.microsoft.com/?id=198755
Example:
Function ShowUserRosterMultipleUsers()
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim i, j As Long
cn.Provider = "Microsoft.Jet.OLEDB.4.0"
cn.Open "Data Source=C:\Northwind2003.mdb"
' The user roster is exposed as a provider-specific schema rowset
' in the Jet 4 OLE DB provider. You have to use a GUID to
' reference the schema, as provider-specific schemas are not
' listed in ADO's type library for schema rowsets
Set rs = cn.OpenSchema(adSchemaProviderSpecific, ,
"{947bb102-5d43-11d1-bdbf-00c04fb92675}")
'Output the list of all users in the current database.
Debug.Print rs.Fields(0).Name, "", rs.Fields(1).Name, "",
rs.Fields(2).Name, rs.Fields(3).Name
While Not rs.EOF
Debug.Print rs.Fields(0), rs.Fields(1), rs.Fields(2), rs.Fields(3)
rs.MoveNext
Wend
End Function
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Jozef" <NO****@NOSPAM.com> wrote in message
news:MeNpe.1606504$8l.792687@pd7tw1no...
I'm trying to find a way to see who or how many connections, (or both)
are open on a single access database.
What I'm trying to do is find out who is logged in and hopefully
automatically send them a message if they are needed out of hte database,
or at least so I know who to talk to if there is a connection to the
database.
If there isn't a way to find out who, then at least if I can find out how
many, I won't get so aggrevated when I find a user in the database, shut
them down, go back to my desk only to find another user is
connected...etc.
Any help would be appreciated.
Thanks!
Jo