Enable a button based on logon User Group

P

PadmaBhaskar

Hi,

I have a menu screen with a few option buttons. The application has
multiple users (say, user1, admin1) belonging to multiple groups (like
AppAdmins, AppUsers)

The button needs to be enabled if the logon user belongs to AppAdmins
group and disabled otherwise.

Is there a way to implement this?

Thanks in advance!
 
O

OfficeDev18 via AccessMonster.com

The function

Environ("USERNAME"), or
Environ(28)

returns the user's initials (at least on my system. See what it returns on
yours). You can use that to do a lookup in your AppAdmins group to find a
match. Valid arguments for this function are 1 thru 30. If username is not
what you want, try one of the others.

Hope this helps,

Sam
 
Top