I am using a long IIf condition in an Access report that summarizes hours worked based on certain zip codes.
Here is my IIf statement:
=Sum(IIf([zip]="90680" Or [zip]="90740" Or [zip]="90742" Or [zip]="90743" Or [zip]="92625" Or [zip]="92626" Or [zip]="92627" Or [zip]="92646" Or [zip]="92647" Or [zip]="92648" Or [zip]="92649" Or [zip]="92655" Or [zip]="92657" Or [zip]="92660" Or [zip]="92661" Or [zip]="92662" Or [zip]="92663" Or [zip]="92683" Or [zip]="92708" Or [zip]="92841" Or [zip]="92844" Or [zip]="92845",([STHours]+[OTHours]+[DTHours]),0))
It returns an #ERROR on my report. There are 22 zip codes being tested for in this statement.
If I remove some of the "Or" statements (I tried it with only 5) it works fine.
Is there a limit to how many conditions I can have in one IIf statement?