Greetings,
I am using Access 97. I have a calculated field in a query called Variance. This field does not exist in the main table.
I have placed this field on a form, and am attempting to perform some conditional formatting.
What I'm trying to do is get a label called label_ExcessiveVariance to be visible when the VARIANCE is greater than or less than $500.
I created the label, calling it label_ExcessiveVariance. It's visible property is set to No.
In the OnCurrent event of the FORM, I have placed this code;
' If the calculated control Variance is <> $500, then display the hidden label. 06-26-02
If [Variance] <> 500 Then
Me![label_ExcessiveVariance].Visible = True
Else
Me![label_ExcessiveVariance].Visible = False
End If
This code does not work. The label is visible at all times. When I change the greather than-Less than to just Greater Than, it works fine. Same with only Less Than.
I've used this type of code before to set the visible properties on Forms and Reports. It's vexing me that it's not working correctly here.
Thanking one and all for any assistance received.
Bob
I am using Access 97. I have a calculated field in a query called Variance. This field does not exist in the main table.
I have placed this field on a form, and am attempting to perform some conditional formatting.
What I'm trying to do is get a label called label_ExcessiveVariance to be visible when the VARIANCE is greater than or less than $500.
I created the label, calling it label_ExcessiveVariance. It's visible property is set to No.
In the OnCurrent event of the FORM, I have placed this code;
' If the calculated control Variance is <> $500, then display the hidden label. 06-26-02
If [Variance] <> 500 Then
Me![label_ExcessiveVariance].Visible = True
Else
Me![label_ExcessiveVariance].Visible = False
End If
This code does not work. The label is visible at all times. When I change the greather than-Less than to just Greater Than, it works fine. Same with only Less Than.
I've used this type of code before to set the visible properties on Forms and Reports. It's vexing me that it's not working correctly here.
Thanking one and all for any assistance received.
Bob