using multiple iif statements

jasn_78

Registered User.
Local time
Tomorrow, 01:41
Joined
Aug 1, 2001
Messages
214
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
 
Just an update i now have the query working for 4 nested iif statements but can't get the fifth any idea?
 
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"))
 
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.
 
Thanks guys but got it sorted seems Access has a 255 character limit for expressions so I figured it out.
 

Users who are viewing this thread

Back
Top Bottom