How to use an message box to make users enter password

M

Martin

....but I still want to achieve these:

when the users click to open the FORM, before this FORM is open, it will
firstly require the user to enter a password : if the password is right,
then open this FORM, if the password is wrong then this FORM will not open.
( I can write VBA, but I don't know how to activate an input box with
"password box" )

Thanks!


Thank you :)
 
G

Guest

Martin,

Did you not see the message that Arvin added to your original thread? I'm
not sure why you started a new thread on this subject, instead of posting
back to the existing thread. Here it is, in case you missed it:

You may be interested in this Knowledge Base article:

http://support.microsoft.com/default.aspx?scid=kb;en-us;179371

So, basically, you need to open a form to allow your users to enter a
password that doesn't require a password itself. The on-click event code for
your command button will include code to 1.) validate the password and 2a.)
open the appropriate password protected form if the user entered a correct
password or 2b.) notify the user that the password is incorrect.

I have an example that I'm willing to share with you, if you send me a
private e-mail message with a valid reply-to address. My e-mail address is
indicated below:

QWaos168@XScom cast. Dnet (<--Remove all capitalized letters and spaces).


Tom

http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 
M

Martin

Hello!

I have found my "way" to resolve this problem, simple and easy : )

Private Sub Form_Open(Cancel As Integer)
Dim hold As Variant


hold = InputBox("Please input the password. ", "Hello!")

If hold <> "12w5" Then
MsgBox "Your password is wrong!", , "Hello"
DoCmd.Close
Else
Exit Sub
End If
Exit Sub
End Sub


I believe, my method is a better method then
http://support.microsoft.com/default.aspx?scid=kb;en-us;179371

Thanks anyway. And you are also a good guy, warmhearted : )
 

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