Agreed, the manual should explicitly state the situations in which IIF() should be used, and the pitfalls of having the expressions always evaluated.

It caught me out at first as coming from a mainly 'C' background I am used to the ternary "?:" operator which appears to work in a similar way. The form is:
quote:
(condition) ? (True-expression) : (False-expression);
The difference is that this is a language construct, and only the expression which corresponds to the result of the condition expression is evaluated.

The fact that IIF() is a function implies that the parameters must be evaluated first, but it will save some headaches if it is spelled out explicitly in the documentation.