Hello,
I am trying to make a form with multiple subforms be able to detect if the value in one textbox in one subform is equal to the value of another textbox in another subform. If they are not equal, then an error message is displayed when the button is clicked.
Would it be like
When I ran the code, the msgbox always popped up even when the values in both text boxes were equal. What am I doing wrong?
I am trying to make a form with multiple subforms be able to detect if the value in one textbox in one subform is equal to the value of another textbox in another subform. If they are not equal, then an error message is displayed when the button is clicked.
Would it be like
Code:
If [Forms]![MainForm]![Subform1].[Form]![Textbox1] <> [Forms]![MainForm]![Subform2].[Form]![Textbox2] Then
Msgbox "Values do not equal"
When I ran the code, the msgbox always popped up even when the values in both text boxes were equal. What am I doing wrong?