Hi.
I've placed the following code on the click event of a command button that leads to a form that is password protected:-
However, I want to be able to also show :-
1) a message box if the password entered is False/Incorrect ( I've tried "If strPasswd=False ) but this I realize is incorrect.
and
2) Instead of having my actual password shown as "HELP" in the prompt box that is displayed, I'd prefer to have it shown as "****".
Any assistance would be greatly appreciated.
Thanks again!
I've placed the following code on the click event of a command button that leads to a form that is password protected:-
Code:
Private Sub cmdSales_Click()
Dim strPasswd
strPasswd = InputBox("Enter Password", "Restricted Form")
If strPasswd = "" Or strPasswd = Empty Then
MsgBox "This Field cannot be left blank", vbInformation, "Required Data"
Exit Sub
End If
If strPasswd = "HELP" Then
DoCmd.OpenForm "SalesSub", acNormal
End If
Exit Sub
End Sub
1) a message box if the password entered is False/Incorrect ( I've tried "If strPasswd=False ) but this I realize is incorrect.
and
2) Instead of having my actual password shown as "HELP" in the prompt box that is displayed, I'd prefer to have it shown as "****".
Any assistance would be greatly appreciated.
Thanks again!
Comment