Determine CurrentUser group association

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My question takes the last post "Can I set access rights and passwor..." by
melly 666 a bit farther. I would like to limit access to multiple users
information to certain permission groups. I have 4 permissions groups: User -
can only access current user information, Advisior - can access multiple user
information from same location, Controller - can access all information and
set permissions, and Admin - can access and modify all objects and
permissions. I've already set up the permissions for various forms and
objects but i need to determine the group that the currentuser belongs to in
order to limit the records in each form.

Thanks in advance
 
You would have to build a function called "IsInGroup". Do a search for that
keyword and you should find numerous previous posts that will instruct you.
 
Further to what Rick said, remember that a user can be (and often is)
in more than one group.

This code enumerates the current user's groups:

(untested)

dim g as group
for each g in dbengine(0).users(currentuser()).groups
msgbox g.name
next

HTH,
TC
 
Back
Top