Access file opened by whom?

D

D.Rider

Access 2000 database on Windows 2000 server. Is it possible to see
who has db open from within Access? Or from Windows 2000 Pro by
non-administrator?

I can see who has open via Server, but want to get out of that
business and let the developer do it for himself, but I don't want to
grant him admin rights to server.

Thanks.
 
G

Graham Mandeno

Hi

The following function will list the computer name and Access login name
("Admin" if you don't have user-based security) of ann users who currently
have the database open. You should be able to modify it to suit your needs.

Public Sub ListCurrentUsers()
Dim rs As ADODB.Recordset
Set rs = CurrentProject.Connection.OpenSchema( _
Schema:=adSchemaProviderSpecific, _
SchemaID:="{947bb102-5d43-11d1-bdbf-00c04fb92675}")
With rs
Do Until .EOF
If !CONNECTED And IsNull(!SUSPECT_STATE) Then
Debug.Print !COMPUTER_NAME, !LOGIN_NAME
End If
.MoveNext
Loop
End With
End Sub

--
Good Luck!
Graham Mandeno [Access MVP]
Auckland, New Zealand

Return mail address is invalid in a vain attempt to reduce spam.
Feedback is welcome at: (e-mail address removed)
Please post new questions or followups to newsgroup.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top