IIf Function
Language Items List
Definition:
Provides for the use of one of two desired values, based on the evaluation of
a conditional expression.
Syntax :
IIf (condition-expression, true-expression,false-expression)
Syntax Description
condition-expression Expression to evaluate which of the next two expressions to return.
true-expression Value of IIf if condition-expression is True.
false-expression Vaue of IIf is condition-expression is False.
Details:
IIf, sometimes called "immediate if," can be used when one of two values is
desired and is dependent on some other condition. For example:
Caption = IIf(Form.Font,Form.Font.FaceName, "Default")
Note: Only the needed expression is evaluated. This means that if the True part is
to be returned, it is evaluated, the False part is not.
See Also: If...Then...Else Statement