IIf

Overview

Returns the second parameter if the first parameter evaluates True. Returns the third parameter if the first parameter evaluates False.

Syntax

IIf(1, 2, 3)

Function Properties

OrdinalTypeDescription
1stringRequiredAny function or expression that returns a true or false result.
2stringRequiredValue to return if the expression evaluates True
3stringRequiredValue to return if the expression evaluates False

Usage

The system returns the value 123 if the @VAR variable is empty and returns the value of @VAR if it exists.