FormatConditions Property

Microsoft Access Visual Basic

FormatConditions Property

       

You can use the FormatConditions property to return a read-only reference to the FormatConditions collection and its related properties.

expression.FormatConditions

expression   Required. An expression that returns one of the objects in the Applies To list.

Remarks

This property is available only by using Visual Basic.

Conditional formatting can also be set on a combo box or text box from the Conditional Formatting dialog box. The Conditional Formatting dialog box is available by clicking Conditional Formatting on the Format menu when a form is in Design view.

Example

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