Hi,
I'm trying to compare 2 calculated numbers in a Subform to see if they are equal. If they are equal, I want to make a textbox visible. I cant get it to work. I'm running the code from the main form, but I've also tried from the subform, with the same result. There are no errors, and it seems to run the if statements, but it always results in a visible text box? If I change the = to a <> it never shows the text box.
The 2 calculated text boxes and the textbox I'm trying to hide/show are all on the footer of the subform.
The Form is called: RFP_FORM
The Subform is called: RFP_subform
The Calculated textboxes are called: QTYORDERED and QTYRECTOTAL
The hide/show textbox is called: completetext
Here is my code that isn't working:
I've also tried....
I'm trying to compare 2 calculated numbers in a Subform to see if they are equal. If they are equal, I want to make a textbox visible. I cant get it to work. I'm running the code from the main form, but I've also tried from the subform, with the same result. There are no errors, and it seems to run the if statements, but it always results in a visible text box? If I change the = to a <> it never shows the text box.
The 2 calculated text boxes and the textbox I'm trying to hide/show are all on the footer of the subform.
The Form is called: RFP_FORM
The Subform is called: RFP_subform
The Calculated textboxes are called: QTYORDERED and QTYRECTOTAL
The hide/show textbox is called: completetext
Here is my code that isn't working:
Code:
Private Sub Form_current()
Me!RFP_subform.Form!completetext.Visible = IIf(Me!RFP_subform.Form!QTYORDERED = Me!RFP_subform.Form!QTYRECTOTAL, True, False)
End Sub
I've also tried....
Code:
If Me!RFP_subform.Form!QTYORDERED = Me!RFP_subform.Form!QTYRECTOTAL Then
Me!RFP_subform.Form!completetext.Visible = True
Else: Me!RFP_subform.Form!completetext.Visible = False
End if