This is probably a simple problem but for some reason I am unable to figure it out.
I have two text boxes and I don’t want an error message to pop up when they click the OK button if the text in the boxes don’t match. The text box that I need to make sure is the same as the first is bound to a database table as well. I thought I was doing this right, but then seeing as I’m only a week old at learning visual basic then it’s a good possibility that I am doing it completely wrong. Here is my code. Please help.
Private Sub cmdOK_Click()
If txtPassword2 txtPassword1 Then
MsgBox “Invalid Password Entered.”, vbExclamation + vbOKOnly
Set Focus = txtPassword1
ElseIf txtPassword2 = txtPassword1 Then
MoveToRecord
End Sub