By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,760 Members | 1,630 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,760 IT Pros & Developers. It's quick & easy.

Query Error: "Expession is too complex"

P: 83
Expand|Select|Wrap|Line Numbers
  1. Paycode': IIf([Project Code]="01","Meeting",IIf([Project Code]="02","Training",IIf([Project Code]="04","Special Project",IIf([Project Code]="05","QC",IIf([Project Code]="06","MDU",IIf([Project Code]="07","UG",IIf([Project Code]="08","2nd Man",IIf([Project Code]="09","Sr Tech Other",IIf([Project Code]="10-1","Loan Out to Nassau",IIf([Project Code]="10-2","Loan Out to Suffolk",IIf([Project Code]="10-3","Loan Out to CTHV",IIf([Project Code]="10-4","Loan Out to Bronx",IIf([Project Code]="10-5","Loan Out to Brooklyn",IIf([Project Code]="10-6","Loan Out to NJ North",IIf([Project Code]="10-7","Loan Out to NJ South",[Project Code],IIf([Paycode Name]="SHIFT","REG",IIf([Paycode Name]="OT","REG",[Paycode Name]))))))))))
I am attempting to execute this criteria in a query and "Expression is too complex" keeps coming up. When I take a few if statements out, it works fine. Is there any way around this because I need all the above to occur.

Thanks in advance...

Oct 7 '08 #1
Share this Question
Share on Google+
1 Reply

Expert 2.5K+
P: 2,653
Hello, Cori.

I would say that nested iif() is a "way around". A straightforward way, advantageous in all aspects, is lookup table.

Oct 7 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.