Hello,
I am creating a report that will group together certain values to return a total value
The issue is, when I add more items to this list, it will return #error
the code in question is:
=Sum(IIf([disb] In ("A4 B&W","1","A4 B&W Duplex","Letter B&W Duplex","Letter B&W","Duplex A4 B&W","A5 B&W","A5 B&W Duplex","Duplex A5 B&W","Legal B&W","Other B&W Duplex","Legal B&W Duplex","Duplex Legal B&W","") And [DName] Like 'COPY*ROOM*',[CountItems],Null))
If I add more Paper Types (e.g. "Executive B&W" it starts to fail
The report contains multiple IIf statements similar to this (for other paper types etc)
The Values are actually retrieved via a vba script that looks up a table column and puts them into the iif statement in a string
Is there a better way to do this?
Thanks
I am creating a report that will group together certain values to return a total value
The issue is, when I add more items to this list, it will return #error
the code in question is:
=Sum(IIf([disb] In ("A4 B&W","1","A4 B&W Duplex","Letter B&W Duplex","Letter B&W","Duplex A4 B&W","A5 B&W","A5 B&W Duplex","Duplex A5 B&W","Legal B&W","Other B&W Duplex","Legal B&W Duplex","Duplex Legal B&W","") And [DName] Like 'COPY*ROOM*',[CountItems],Null))
If I add more Paper Types (e.g. "Executive B&W" it starts to fail
The report contains multiple IIf statements similar to this (for other paper types etc)
The Values are actually retrieved via a vba script that looks up a table column and puts them into the iif statement in a string
Is there a better way to do this?
Thanks