By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,482 Members | 1,638 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,482 IT Pros & Developers. It's quick & easy.

Checking for group membership?

P: n/a
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.

Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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.

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.