IIF() returns one of two values, depending on the value of a given logical condition. If the Boolean test is true, IIF() returns the true value, otherwise it returns the false value. The true and false values may be any valid type, provided they are compatible types, such as the numeric, double and integer types.

Function Format

IIF(Boolean test, true value, false value)

Return Value

IIF() returns a value having a type compatible with the types of the true and false values