FormatCondition.Modify (Access)
You can use the Modify method to change the format conditions of a FormatCondition object in the FormatConditions collection of a combo box or text box control.
Modify (Type, Operator, Expression1, Expression2)
CreateForm.Controls(1).FormatConditions(1).Modify Type:=acDataBar
Arguments
The following argument is required
Type (AcFormatConditionType) - An AcFormatConditionType constant that specifies the type of condition to be modified.
Possible values are
acDataBar | The conditional format is displayed as a data bar. |
acExpression | The conditional format is based on an expression. |
acFieldHasFocus | The conditional format is based on the value of the control that has focus on a form. |
acFieldValue | The conditional format is based on values in the selected control. |
Optional arguments
The following arguments are optional
Operator (AcFormatConditionOperator) - An AcFormatConditionOperator constant that specifies the type of operator to be used. NOTE: If the type argument is acExpression, the operator argument is ignored. If you leave this argument blank, the default constant (acBetween) is assumed.
Possible values are
acBetween | The value must be between the values specified by the Expression1 and Expression2 arguments. |
acEqual | The value must equal to the value specified by the Expression1 argument. |
acGreaterThan | The value must be greater than the value specified by the Expression1 argument. |
acGreaterThanOrEqual | The value must be greater than or equal to the value specified by the Expression1 argument. |
acLessThan | The value must be less than the value specified by the Expression1 argument. |
acLessThanOrEqual | The value must be less than or equal to the value specified by the Expression1 argument. |
acNotBetween | The value must not be between the values specified by the Expression1 and Expression2 arguments. |
acNotEqual | The value must not be equal to the value specified by the Expression1 argument. |
Expression1 - A value or expression associated with the first part of the conditional format. Can be a constant value or a string value
Expression2 (AcFormatConditionOperator) - A 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 value or a string value.
Possible values are
acBetween | The value must be between the values specified by the Expression1 and Expression2 arguments. |
acEqual | The value must equal to the value specified by the Expression1 argument. |
acGreaterThan | The value must be greater than the value specified by the Expression1 argument. |
acGreaterThanOrEqual | The value must be greater than or equal to the value specified by the Expression1 argument. |
acLessThan | The value must be less than the value specified by the Expression1 argument. |
acLessThanOrEqual | The value must be less than or equal to the value specified by the Expression1 argument. |
acNotBetween | The value must not be between the values specified by the Expression1 and Expression2 arguments. |
acNotEqual | The value must not be equal to the value specified by the Expression1 argument. |