I have the following code in On Load and it asks for the password twice and still opens the form. Does the same thing in On Open too. What am I doing wrong?
Private Sub Form_Open(Cancel As Integer)
Dim PassWord As String
PassWord = InputBox("Enter Password")
If PassWord = "Oscar" Then
DoCmd.OpenForm "Deans Page"
Else
MsgBox ("you are not authorized to use the Deans Page")
End If
End Sub