Table of contents
Collapse the table of content
Expand the table of content

FormatConditions.Add Method (Access)

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

You can use the Add method to add a conditional format as a FormatCondition object to the FormatConditions collection of a combo box or text box control.


expression. Add( ** Type, ** Operator, ** Expression1, ** Expression2 )

expression A variable that represents a FormatConditions object.


NameRequired/OptionalData TypeDescription
TypeRequiredAcFormatConditionTypeAn AcFormatConditionType constant that specifies the type of format condition to be added.
OperatorOptionalAcFormatConditionOperatorAn AcFormatConditionOperator constant that specified the operator. If the Type argument is acExpression, the Operator argument is ignored. If you leave this argument blank, the default constant ( acBetween ) is assumed.
Expression1OptionalVariantA value or expression associated with the first part of the conditional format. Can be a constant or a string value.
Expression2OptionalVariantA value or expression associated with the second part of the conditional format when the Operator argument is acBetween or acNotBetween (otherwise, this argument is ignored). Can be a constant or a string value.

Return Value



You can use the Delete method of the FormatConditions collection to delete an existing FormatConditions collection from a combo box or text box control.

See also


FormatConditions Collection

© 2018 Microsoft