I am trying to create an On Click event in VBA which will compare two unbound controls on my form and then open another form if the two controls match. For some reason I am running into problems although I know this has an easy solution. Current code is as follows:
Private Sub cmdEnter_Click()
If Me.txtInput = Me.txtverify Then
DoCmd.Close
DoCmd.OpenForm “MainMenu”
Else
MsgBox (“Error, please re-submit”)
End If
End Sub
Thanks in advance for any assistance.