IIf

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

IIf(1, 2, 3)

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

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