I would like to create a password on a form, but I cannot get the form
to close when the wrong password is entered. I have also tried
docmd.close.
Appreciate some help.
Private Sub Form_Current()
Dim Password, Pword
Password = "Swordfish"
Pword = InputBox("Type in your password")
If Pword <> Password Then
MsgBox "Sorry, incorrect password"
exit
End If
End Sub