Re: Access - three IIF expression



Michelle wrote:
I have the below expression which is working fine for me, but not
perfect,
because I need one more IIF in the expression, ' iif([Stat07]="R",1) ,
I just
can't make it work after putting this condition in.

BldgAssess07:
Sum(IIf([Stat07]="A",Round([PLrate07]*[KM]*0.1,0),IIf([Stat07]="p",Round([PLrate07]*[KM],0))))

Thanks in advance!
I think this is what you're after:

Sum(IIf([Stat07]="A",Round([PLrate07]*[KM]*0.1,0),IIf([Stat07]="p",Round([PLrate07]*[KM],iif([Stat07]="R",1,0)))))

You will probably get more help for your non-ADO questions in one of the
Access groups (expand Office Solutions in the table of contents). There is
at least one devoted to queries, and another to VBA.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


.