Mohsin Malik
Registered User.
- Local time
- Today, 17:52
- Joined
- Mar 25, 2012
- Messages
- 175
I have a crosstab Query in Ms-Access where i have set the Value Property based on Combo Box Selection, below is the Expression Builder code that worked fine, but when i want to add 03 more Criteria, It give me the following error? The Expression you entered is too complex??
This Works fine:
Value: IIf([Forms]![A]!=777,Round(Sum([cost]),0),IIf([Forms]![A]!=666,Count([ID]),IIf([Forms]![A]!=888,Round(Max([Mileage]),0),IIf([Forms]![A]!=1,Round(Avg([KM]),1),IIf([Forms]![A]!=2,Round(Avg([MPG]),1),IIf([Forms]![A]!=333,Round(Sum([Trip]),0),IIf([Forms]![A]!=4,Round(Sum([gallons]),0),IIf([Forms]![A]!=6,Round(Sum([WHT]),0),IIf([Forms]![A]!=7,Round(Sum([OtherThanWH]),0),IIf([Forms]![A]!=8,Round(Sum([insuredvalue]),0),IIf([Forms]![A]!=9,Round(Avg([CPM]),0),IIf([Forms]![A]!=10,Round(Avg([CPK]),0),IIf([Forms]![A]!=11,Round(Max([k1]),0),IIf([Forms]![A]!=12,Max([m1]),0))))))))))))))
Giving Error of Expression is too complex!
Value: IIf([Forms]![A]!=777,Round(Sum([cost]),0),IIf([Forms]![A]!=666,Count([ID]),IIf([Forms]![A]!=888,Round(Max([Mileage]),0),IIf([Forms]![A]!=1,Round(Avg([KM]),1),IIf([Forms]![A]!=2,Round(Avg([MPG]),1),IIf([Forms]![A]!=333,Round(Sum([Trip]),0),IIf([Forms]![A]!=4,Round(Sum([gallons]),0),IIf([Forms]![A]!=6,Round(Sum([WHT]),0),IIf([Forms]![A]!=7,Round(Sum([OtherThanWH]),0),IIf([Forms]![A]!=8,Round(Sum([insuredvalue]),0),IIf([Forms]![A]!=9,Round(Avg([CPM]),0),IIf([Forms]![A]!=10,Round(Avg([CPK]),0),IIf([Forms]![A]!=11,Round(Max([k1]),0),IIf([Forms]![A]!=12,Max([m1]),IIf([Forms]![A]!=191,Max([TActual]),IIf([Forms]![A]!=192,Max([TKM]),IIf([Forms]![A]!=193,Max([TMiles]),0)))))))))))))))))
Looking forward for the solution
Thank you
Mohsin
This Works fine:
Value: IIf([Forms]![A]!=777,Round(Sum([cost]),0),IIf([Forms]![A]!=666,Count([ID]),IIf([Forms]![A]!=888,Round(Max([Mileage]),0),IIf([Forms]![A]!=1,Round(Avg([KM]),1),IIf([Forms]![A]!=2,Round(Avg([MPG]),1),IIf([Forms]![A]!=333,Round(Sum([Trip]),0),IIf([Forms]![A]!=4,Round(Sum([gallons]),0),IIf([Forms]![A]!=6,Round(Sum([WHT]),0),IIf([Forms]![A]!=7,Round(Sum([OtherThanWH]),0),IIf([Forms]![A]!=8,Round(Sum([insuredvalue]),0),IIf([Forms]![A]!=9,Round(Avg([CPM]),0),IIf([Forms]![A]!=10,Round(Avg([CPK]),0),IIf([Forms]![A]!=11,Round(Max([k1]),0),IIf([Forms]![A]!=12,Max([m1]),0))))))))))))))
Giving Error of Expression is too complex!
Value: IIf([Forms]![A]!=777,Round(Sum([cost]),0),IIf([Forms]![A]!=666,Count([ID]),IIf([Forms]![A]!=888,Round(Max([Mileage]),0),IIf([Forms]![A]!=1,Round(Avg([KM]),1),IIf([Forms]![A]!=2,Round(Avg([MPG]),1),IIf([Forms]![A]!=333,Round(Sum([Trip]),0),IIf([Forms]![A]!=4,Round(Sum([gallons]),0),IIf([Forms]![A]!=6,Round(Sum([WHT]),0),IIf([Forms]![A]!=7,Round(Sum([OtherThanWH]),0),IIf([Forms]![A]!=8,Round(Sum([insuredvalue]),0),IIf([Forms]![A]!=9,Round(Avg([CPM]),0),IIf([Forms]![A]!=10,Round(Avg([CPK]),0),IIf([Forms]![A]!=11,Round(Max([k1]),0),IIf([Forms]![A]!=12,Max([m1]),IIf([Forms]![A]!=191,Max([TActual]),IIf([Forms]![A]!=192,Max([TKM]),IIf([Forms]![A]!=193,Max([TMiles]),0)))))))))))))))))
Looking forward for the solution
Thank you
Mohsin