ник: osmor
http://hiprog.com/index.php?option=com_content&task=view&id=358
http://hiprog.com/index.php?option=com_content&task=view&id=603
http://hiprog.com/index.php?option=com_content&task=view&id=168
и в догонку
Sub ListUsers()
' Lists the current users of the database to
' the debug window.
' From Access 2002 Enterprise Developer's Handbook
' by Litwin, Getz, and Gunderloy. (Sybex)
' Copyright 2001. All rights reserved.
Dim cnn As ADODB.Connection
Dim rst As ADODB.Recordset
Dim fld As ADODB.Field
Dim intUser As Integer
' The user list schema information requires this magic
' number. Why isn't a constant predefined for this?
' Who knows.
Const adhcUsers = "{947bb102-5d43-11d1-bdbf-00c04fb92675}"
Set cnn = New ADODB.Connection
Set cnn = CurrentProject.Connection
Set rst = cnn.OpenSchema(adSchemaProviderSpecific, , adhcUsers)
With rst
Do Until .EOF
intUser = intUser + 1
Debug.Print "User # " & intUser
For Each fld In .Fields
Debug.Print " " & fld.name & "=" & fld.Value
Next
.MoveNext
Loop
End With
End Sub
|