FormatConditions Collection

Microsoft Access Visual Basic

FormatConditions Collection

         
Multiple objects FormatConditions
FormatCondition

The FormatConditions collection represents the collection of conditional formats for a combo box or text box control. Each format is represented by a FormatCondition object.

Using the FormatConditions Collection

Use the FormatConditions property of a combo box or text box in Visual Basic or in an expression to return a FormatConditions collection. Use the Add method to create a new conditional format, and use the Modify method to change an existing conditional format.

You can use the Modify method to change one of the formats, or the Delete method to delete a format.

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.