Creating a form for a Password

M

mrsgwen

I have created a Password form that will secure another form. Once the
password is entered it will open the form that has the list of reports. On
the form I have a text box that accepts the user's password and I have 2
command buttons one is OK and the other is CANCEL. Can anyone tell me how to
make these buttons work to open the form of reports?
 
F

fredg

I have created a Password form that will secure another form. Once the
password is entered it will open the form that has the list of reports. On
the form I have a text box that accepts the user's password and I have 2
command buttons one is OK and the other is CANCEL. Can anyone tell me how to
make these buttons work to open the form of reports?

Code the click event of the OK button:

If Me.[PasswordControl] = "the password" Then
DoCmd.OpenForm "ReportForm"
DoCmd.Close acForm, Me.Name

Code the Cancel button:
DoCmd.Close acForm, Me.Name
 
Top