Current Group

M

Marie

Hi,

Does anyone know if there is a procecedure or function
call to find out the group a user of the database belongs
to? There is a CurrentUser function that returns the name
of the current user. Is there something similar that
identifies the group a user belongs to.

I am using Access 2000 with VBA, and have secured the
database with User Level Security. I'd like to do an
action only if the user belongs to the 'Admins' group.

Thanks,

Marie
 
V

Van T. Dinh

Small correction: A User can belongs to more than one group.

Using DAO, you can use the Users Collection of the WorkSpace Object (and the
CurrentUser() function) to create a User Object. You can then use code to
enumerate the Groups that the User belongs to through the Groups Collection
of the User Object.

Check Access VB(A) Help on the following objects: WorkSpace, Users, User,
Groups, Group.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top