That is a rather strange approach to parenthesizing.
mjm: IIf(([Transaction Errors]>=10,([Transaction Errors],0)
Assuming what you want is to return in Query Field the value of the Field
"Transaction Errors" if there are ten or more, otherwise return a value of
zero, that should read:
mjm: IIF(NZ([Transaction Errors])>=10, NZ([Transaction Errors), 0 )
The entire argument list of the IIF function is parenthesized. The NZ
function converts Nulls to Zero, and its arguments are parenthesized also.
I used it on both the test for value, and the return value, because I am not
certain whether each argument is evaluated before the first argument is
applied. In general, any Null in a calculation will cause the calculation
to return Null, which I did not think was your desire.
If I have misunderstood what you want, or other details, post back, and
perhaps someone can help.
In general, it is a good idea to explain specifically what your question is,
and if something is going wrong, to describe it in detail. It's difficult
enough to debug remotely, but often impossible without information. In your
case, it seemed clear that the unorthodox use of parentheses was likely the
problem. I'm reasonably certain that Excel does not gladly suffer unbalanced
parentheses -- what would give you the idea that Acces would?
Larry Linson
Microsoft Office Access MVP
mjm697 said:
I need help writing this up in an access formula. This is going in to a
Query.
Here it is in excel formula
=IF(D11<6,Q11,0)
This is what I have in access.
mjm: IIf(([Transaction Errors]>=10,([Transaction Errors],0)