I have a password prompt form with an "okay" button.
When that Okay button is clicked, the action needs to check the password attempt vs the actual password, close the prompt form, open the next form and go to a control.
This is my code. It is on the 'On click' event of the button.............
Private Sub cmdAdd_Click()
Dim stDocName As String
stDocName = "USER_ADD"
If Me.PasswordAttempt.Value = Me.PASSWORD Then
DoCmd.Close acForm, "SECURITY", acSaveNo
DoCmd.OpenForm stDocName, acNormal, , , acFormAdd, acWindowNormal
Forms!SECURITY!Message = "Password Incorrect"
I'm still learning vba and consider myself an amateur. Please tell me why this hates me so.