Code

crcastilla

Registered User.
Local time
Today, 07:14
Joined
Aug 20, 2011
Messages
21
Hello,

I want to put a check box in a form and I want it so I want to check the box it asks me for a password.

How do I do this?

Thank you!
 
I meant to say so when I try to check the box it will ask me for the password.

Please help.
 
Okay so this is what I typed

Private Sub Sales_Click()
If InputBox("Enter Password Please") <> "somevalue" Then
MsgBox "Password Invalid.", vbOKOnly
Cancel = True
Exit Sub
End If
End Sub


It does ask me for the password but it still lets me check the box. I want so when I want to check the box it will ask me for the password and if I put the wrong password the box will not get checked.

Sorry I did not explain that earlier.
 
You could use this

Code:
Private Sub Sales_Click()
If InputBox("Enter Password Please") <> "somevalue" Then
     MsgBox "Password Invalid.", vbOKOnly
     Me!sales=false
else
    Me!sales=true
End If
End Sub
 
I know this is old but I forgot that I also want it that whenever I try to uncheck the box it will ask me for the same password and I don't put it in correctly then it will not be unchecked.
 

Users who are viewing this thread

Back
Top Bottom