password logic

diversoln

Registered User.
Local time
Today, 19:52
Joined
Oct 8, 2001
Messages
119
I'd like to make decisions on what forms to open based upon a password that the user enters on a form called Pass_Ask.

The logic for entering the password is working well. The problem I'm having is with opening the appropriate form.


On the Pass_Ask form, I'm using logic as follows:


If (Me!password = "general_user") or (Me!password = "super_user") then

Goto Open_Switchboard
Else
Msgbox "Password not acceptable"
End if


This routine opens the switchboard if either of the two acceptable passwords are entered, and doesn't if the right password isn't entered. Now when the switchboard comes up, and the user presses a button to open the data entry form, the form opened will depend on the user level. This is where I'm having the trouble. Could someone suggest code that will help out?
 
Create a Global boolean/bit variable in a basic module that when a user logs on succesfully the global variable is set to True and everytime any form is loaded you can have the Form_Open Event check the value of the global variable to set object properties for the Administrator, while the form is configured for a basic User logon if not an Administrator.
 

Users who are viewing this thread

Back
Top Bottom