Access USER ID

  • Thread starter Thread starter Abe Katz
  • Start date Start date
A

Abe Katz

Hello Everybody!

How can I get the users sign on, Name and the Group Code from "User and
group Accounts" Member Of (which group he is)?

Thanks
abe
 
Have a look at CurrentUser. Also, this code is taken from the help screens

For Each usrLoop In .Users
Debug.Print " " & usrLoop.Name
Debug.Print " Belongs to these groups:"

' Enumerate all Group objects in each User
' object's Groups collection.
If usrLoop.Groups.Count <> 0 Then
For Each grpLoop In usrLoop.Groups
Debug.Print " " & _
grpLoop.Name
Next grpLoop
Else
Debug.Print " [None]"
End If

Next usrLoop
 
another useful way of determining who is logged in is via the windows API.

Have a look at this link, you may or may not decide to use it - but I
thought I'd bring them to your attention anyway, if nothing else, the site
is a goldmine of information and sample code:

http://www.mvps.org/access/api/api0008.htm

Cheers

John Webb
 
Back
Top