Hi,
I have a form where I need a conditional formatting on a field [TT].
So if I use a basic way to do it (condition 1), the expression is [CAV]-[TTA]>0 is working fine and the back color become green as I need.
I can't use that way, because this is an indicator which I don't want to show all the time.
So I tried do it using vba with a button Command143:
Private Sub Command143_Click()
FormatConditions.Add acExpression, acEqual, "IIf([CAV]-[TTA]>0, True, False)"
FormatConditions(1).BackColor = vbGreen
End Sub
But I get a runtime error 404: “Object required”
I never use this way before…Can you help me please?
Thanks
I have a form where I need a conditional formatting on a field [TT].
So if I use a basic way to do it (condition 1), the expression is [CAV]-[TTA]>0 is working fine and the back color become green as I need.
I can't use that way, because this is an indicator which I don't want to show all the time.
So I tried do it using vba with a button Command143:
Private Sub Command143_Click()
FormatConditions.Add acExpression, acEqual, "IIf([CAV]-[TTA]>0, True, False)"
FormatConditions(1).BackColor = vbGreen
End Sub
But I get a runtime error 404: “Object required”
I never use this way before…Can you help me please?
Thanks