G
Guest
Katherine said:Is it possible to password protect a form rather than the
entire Database?
Gerald Stanley replied:
Something along the lines of
Private Sub Form_Open(Cancel As Integer)
Const strFormPassword As String = "Password"
If InputBox("Please Enter Password") <> strFormPassword Then
MsgBox "Password Incorrect", vbOKOnly
Cancel = True
End If
End Sub
I have a commond button on form1 that opens the password-protected form2. If incorrect password is entered, the code above shuts form1 which was opened originally. Can this code be altered in such way that form1 remains open if incorrect password is entered, and possibly with a pop-up message asking to try again?
Sorry that I am not code literate at all. Thanks for any help!
Sam