View Full Version : using multiple iif statements


jasn_78
08-15-2001, 08:43 PM
Can somebody please tell me if there are any problems known with writing iif statements inside each other in QBE as I am coming up with a syntax error saying missing operator and i don't know where.

Thanks

jasn_78
08-15-2001, 09:29 PM
Just an update i now have the query working for 4 nested iif statements but can't get the fifth any idea?

jatfill
08-16-2001, 08:33 AM
I've done several of these before where I have multiple conditions, but I've never gone above 3-4 I THINK. Maybe post the statement, & we can take a look at it...

Usually when I do this, I'm checking
<0
=0
>0

Here's a sample of one I have in the stuff I'm working on right now...

=IIf([est_diff]<0,Format([est_diff],"Currency") & " Under",IIf([est_diff]=0,"Balanced",Format([est_diff],"Currency") & " Over"))

Val
08-16-2001, 10:03 AM
Just for the record I've done nested iif statements with 5-6 conditions and had them work successfully. Anything above that I would suggest writing a case statement for.

Jatfill is right, the best thing to do would be to post your statement.

jasn_78
08-19-2001, 08:05 PM
Thanks guys but got it sorted seems Access has a 255 character limit for expressions so I figured it out.