SG wrote:
> I'm using access 2002. In my access front end, I have a switchboard with a
> couple of menus. Is it possible to block one of the menu?
If you need to find out the name of the current user, there's a
CurrentUser() function (search Access VBA help for it).
And to determine the current user's groups (lifted from
http://support.microsoft.com/default...t%2Fsecfaq.asp
Question 22):
Function faq_ListGroupsOfUser (strUserName As String)
Dim ws As WorkSpace
Dim usr As User
Dim i As Integer
Set ws = DBEngine.Workspaces(0)
Set usr = ws.Users(strUserName)
For i = 0 To usr.Groups.count - 1
Debug.Print usr.Groups(i).Name
Next i
End Function
HTH,
Anno.