Hi Guys,
apologies if this has been covered but can not seem to find it;
problem is that the below code does not work on my db. It asks for the password but even if i enter an incorrect password it still opens the DB albeit after the pop up message saying Invalid Password, Please try again.
Private Sub Form_Load()
Dim PassWord As String
PassWord = InputBox("Please Enter Administrator Password")
If PassWord = "admin123" Then
DoCmd.OpenForm "formname"
Else
MsgBox ("Invalid Password, Please try again.")
DoCmd.Close
End If
End Sub
many many thanks!
Bill
apologies if this has been covered but can not seem to find it;
problem is that the below code does not work on my db. It asks for the password but even if i enter an incorrect password it still opens the DB albeit after the pop up message saying Invalid Password, Please try again.
Private Sub Form_Load()
Dim PassWord As String
PassWord = InputBox("Please Enter Administrator Password")
If PassWord = "admin123" Then
DoCmd.OpenForm "formname"
Else
MsgBox ("Invalid Password, Please try again.")
DoCmd.Close
End If
End Sub
many many thanks!
Bill