Blanking out form buttons

  • Thread starter Thread starter Daz01
  • Start date Start date
D

Daz01

Hi need some help

Ive got a database with 2 forms. The first one is a password screen
where the user types in his/her password. Each user has a secruity
level up to 100. So 1 user could have 34 and another 90.

When the user logs in they come to a main menu form with 6 buttons on.
At the moment the buttons are avaliable for everyone to see. I want to
make it so that when a user logs in, depending on their secruity
level, they can only access certain buttons.

Example: User with secruity level 34 can only see 3 buttons
User with secruity level 90 can only see 5 buttons

What is the code I need to allow me to acheive this?

I am using Microsoft Access 2007
 
In the load event of the form, turn visibility on (or off if the design
saved them as on).


Me.Button1.Visible=(SecurityLevel >=34)
Me.Button2.Visible=(SecurityLevel >=52)

etc.


Hoping it may help,
Vanderghast, Access MVP
 
Back
Top