Access IIf Function

Last updated: August 26, 2026.

The IIf function evaluates a condition and returns one value when it is true and another when it is false.

Syntax

IIf(expression, truepart, falsepart)
ArgumentDescription
expressionCondition evaluated as True or False
truepartValue returned when the condition is True
falsepartValue returned when the condition is False

Examples

StatusLabel: IIf([IsActive], "Active", "Inactive")
Discount: IIf([Total] >= 1000, 0.1, 0)
SafeName: IIf(IsNull([Name]), "(none)", [Name])

Both result expressions may be evaluated. Do not rely on IIf to protect an expression that can divide by zero or otherwise raise an error.

See Microsoft’s Access function reference for related expression functions.

admin

admin

Leave a Reply

Your email address will not be published.