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)| Argument | Description |
|---|---|
expression | Condition evaluated as True or False |
truepart | Value returned when the condition is True |
falsepart | Value 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.