FormatConditions, FormatCondition Object Example
The following example adds a conditional formatting to a text box, "Textbox1" and sets some properties of the newly added FormatCondition object.
With Forms("form1").Controls("Textbox1").FormatConditions _
.Add(acFieldValue, acGreaterThan, "=[Textbox2]")
.BackColor = RGB(255,255,255)
.FontBold = True
.ForeColor = RGB(255,0,0)
End With
The following example sets format properties for an existing conditional format for the "Textbox1" control.
With forms("forms1").Controls("Textbox1").FormatConditions(1)
.BackColor = RGB(255,255,255)
.FontBold = True
.ForeColor = RGB(255,0,0)
End With