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
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Karen Hill" <ka**********@yahoo.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
I would like to be able to programatically check for group membership
in an access database. For example, I would like to be able to check
is someone is in the admin group before the program does Y.
something like:
if( current.user.group == admin){
do_something();
}
Thanks in advance friends.