I have a form that has a button on it that opens another
form containing cartoon pics. I like would to password the button so only me and three other adults have access. The staff don't want the kids to have access to all the pics...
Some simple code like [tt]
Private Sub cmdCartoons_Click()
Dim PassWord As String
PassWord = InputBox ("Enter the Password")
If PassWord = "I'm An Adult" then
' Open the form
Else
MsgBox ("You're not authorized")
End If
End Sub
[/tt]
More security can be had by storing the password in a database so that you can change it or by using one of the more advanced methods to mask the password so that you can't see what's being typed.
Thanks a million. I love it! But there's one problem. It will not open up the form after I entered the correct pass word. It comes up with the password box, I type in the and that's it. Did I miss something? How do I get it to open up the form.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.