Creating a form for a Password

G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top