Password

hmongie

Registered User.
Local time
Today, 22:20
Joined
May 17, 2003
Messages
99
I am trying to place a password on a command button. the command button is on my main switchboard. Although, I only have one switchboard, each command button opens up the sub switchboards. Under my forms, there is only one switchboard. What should I input after the doCmd.openForm "......"?

This is what I have.
............

If InputBox("Enter Password?", "") = "myPass" Then
doCmd.openForm "Evaluations"
Else
msgbox "Incorrect Password!"
End If
................

"Evaluations" is a switchboard page. It has options that shows records.

This is the error that I get.

..............
Microsoft Visual Basic
Run-time error '2102':
The form name 'Evaluations' is misspelled or refers to a form that doesn't exist.
...................

Can anyone help...?
 
A switchboard is a form. Are you sure you haven't mixed up a form and a Data Access Page?
 
Troubleshoot

If you create a new form and create a new command button with the wizard and have it open the form On Click, will the Evaluations form open?
 
The "Evaluation" is actually a switchboard. For example, I only have one switchboard. The Evaluation command button links to another area of my switchboard. I just need to know how to make it work when I put a password on it.
 
hmongie said:
The "Evaluation" is actually a switchboard.

And a switchboard is "actually" a form.

Why don't you post an example of the error?
 
LOL... fine...

If you create a new form and create a new command button with the wizard and have it open the form On Click, will the Evaluations SWITCHBOARD open?
 
Thanks everyone, I pretty much just gave up on it. I'll work on it when ever I have more time. Thanks for all the post though.
 
If you'd just post an example I bet this could be solved within minutes. It's just that you appear lost somewhere - either in terminology , the VBA required, or clarity.
 
Example...

Here is an example. I am trying to get the Result button to link to a section of the switchboard once the correct password is entered. Please help with this... thanks everyone.
 
Example...

Can you tell me how to attach a sample database...?
 
You can attach a sample DB when you reply by looking for the
attach file (browse for your file).

You should compact/repair and then zip your db so that it
will conform to the size rules.

Wayne
 
Sample DB

Here is the sample DB, if anyone can help please let me know.

The password for the bottom result is "youcandoit". Once the correct password is given, I get an error.
 

Attachments

The only error I get is one saying that the form you are trying to open (Results) is not found.

This is hardly surprising as there is no form in the example called Results. In fact, there is only one form and that's the Switchboard.

:rolleyes:
 
Very interesting, Mile. Is there anything that can be done? Do you think you can fix it?:D
 
Yes, that's it. There is another section in the switch board. For example, without the password option, when I click on the result command button, it brings up the section of the switchboard that has some options. How can I make the command button to access those areas with the password option?
 
Start using control names rather than implicit names as it may be easier to know what you are referring to.
 
If you open the switchboard item in tables. The "result" portion is there. Any ideas on what to name it so that I can have the command button work with the password?
 
hmongie said:
If you open the switchboard item in tables. The "result" portion is there.

That's just a record.

hmongie said:
Any ideas on what to name it so that I can have the command button work with the password?

If you have a form called Results then that can be opened by a correct password then that's IT! :rolleyes:
 

Users who are viewing this thread

Back
Top Bottom