Marco said:
Hi. i would like to give some permissions in my form directly from VBA
code.
How can I identify to which group the current user belong?
A user can be in multiple groups, so you need to ask the question:
Is the user in the Admin (or whatever) group?
rather than
Which group is the user in?
Function IsUserInGroup(strUser As String, strGroup As String) As Boolean
Dim varDummy As Variant
On Error Resume Next
varDummy = DBEngine(0).Users(strUser).Groups(strGroup).Name
IsUserInGroup = (Err.Number = 0)
End Function