Adjusting by CurrentUser

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

Guest

I know this question has been addressed before, but I'm still a little fuzzy
on it. I've got a menu that launches when the db opens. I want to change
the options available based on the group of the CurrentUser (even though they
can be multiple groups). So how can I get the form to draw the group info
during it's OnLoad function?
 
Where exactly am I putting the function? Should this be in a new module, or
in with the form? Secondly, if it is in a new module, how do I call it
properly. This is where I'm having my hang-ups. I'm sorry, I know it's a
bit remedial...I'm still learning.
 
If you've got a function called IsUserInGroup, or somesuch, you can do
one of two things with it.

(1) Put it in the form's code module, say at the top. Then you can call
it from anywhere within the form; eg. from within the Open or Load
event. Or,

(2) Put it in a standard module (not associated with any form). In that
case, make sure that it starts with "Public Function IsUser etc.", not
"Private Function", or just "Function".

These functions do not really "find which group a user is in". They
determine whether a specified user is or is not in a specified group -
not the same thing.

HTH,
TC (MVP Access)
http://tc2.atspace.com
 
Back
Top