Modify 方法

expandtri全部显示

使用 Modify 方法可以更改组合框文本框控件的 FormatConditions 集合中 FormatCondition 对象的格式条件。

expression.Modify(Type, Operator, Expression1, Expression2)

expression    必需。返回“应用于”列表中的一个对象的表达式。

Type   必需 AcFormatConditionType

AcFormatConditionType 可以是下列 AcFormatConditionType 常量之一:

acExpression

acFieldHasFocus

acFieldValue

Operator   可选 AcFormatConditionOperator

AcFormatConditionOperator 可以是下列 AcFormatConditionOperator 常量之一:

acBetween 默认

acEqual

acGreaterThan

acGreaterThanOrEqual

acLessThan

acLessThanOrEqual

acNotBetween

acNotEqual

如果参数 type 是 acExpression,则忽略 operator 参数。如果将该参数留空,则假定为默认常量 (acBetween)

Expression1     可选 Variant 型。与条件格式的第一部分相关的 Variant 值或表达式。可以是常量值或字符串值。

Expression2     可选 Variant 型。当 operator   参数为 acBetweenacNotBetween 时,与条件格式的第二部分相关的 Variant 值或表达式(否则,忽略该参数)。可以是常量值或字符串值。