Link to home
Start Free TrialLog in
Avatar of esbyrt
esbyrtFlag for Canada

asked on

Restrict access to certain tabs on Access Form by who is logged in

I am using an audit trail in my database based on this http://www.fontstuff.com/access/acctut21.htm. It captures the current user with Environ. Now I also need to restrict or hide the Medical tab in this employee database for confidentiality reasons. There are only about 4 people who will have full access so I wonder if there is a way to hide this tab for all users except the few that need access? I could code it directly into the module or maybe create a table that lists certain users with administrator level? Suggestions anyone? Thanks in advance!

I am using a navigation form so the path to the tab control will be a long one.
SOLUTION
Avatar of bfuchs
bfuchs
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of esbyrt

ASKER

Hi. Sorry for the slow reply, I was away for the long weekend. So if I create a table of users and their associated levels, do I then have to check against the table each time the navigation form loads via the onload event or would I have to check as each form within the navigation form loads?

Can you tell me the syntax to hide the medical tab? It is on the frmEmployee under frmNavigation. The detail section has TabCtrl41 with the tab I want to hide called Medical.

Thanks!
each time the navigation form loads via the onload event
thats correct.
with the tab I want to hide called Medical
try me.Medical.visible = false
Avatar of esbyrt

ASKER

Thanks for the help! I am closing this question for now as things have come up and I don't have time to actually work on the database right now. Once I have time to dive back in I will post a more specific question if I run into problems. Thanks again!
PS  I split the points between both commenters, I hope that's ok?