\<bookmark_value\>IIf statement\</bookmark_value\>

IIf Statement

Returns one of two possible function results, depending on the logical value of the evaluated expression.

Syntax:

IIf (Expression, ExpressionTrue, ExpressionFalse)

Parameters:

\<emph\>Expression:\</emph\> Any expression that you want to evaluate. If the expression evaluates to \<emph\>True\</emph\>, the function returns the result of ExpressionTrue, otherwise it returns the result of ExpressionFalse.

\<emph\>ExpressionTrue, ExpressionFalse:\</emph\> Any expression, one of which will be returned as the function result, depending on the logical evaluation.

Error codes:

5 Invalid procedure call