Current Group

  • Thread starter Thread starter Marie
  • Start date Start date
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
 
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.
 
Back
Top