simon551
IS-IT--Management
- May 4, 2005
- 249
Hi. I'm having a hard time getting the syntax of this multi-IIf statement correct. If you can help me I'd really appreciate it.
it's giving me an error message of: 'Wrong number of arguments used with query expression.'
Thanks!
it's giving me an error message of: 'Wrong number of arguments used with query expression.'
Code:
SELECT tblMembershipsProcessed.processDate, tblMembershipsProcessed.amountPaid, Month([processDate]) AS processMonth, Year([processDate]) AS processYear,
IIf([processYear]=2008,IIf([processMonth]<=2,Round(([AmountPaid]/12),2),
IIf([processYear]=2007,IIf([processMonth]>=2,Round(([AmountPaid]/12),2),0),0),0),0) AS [Feb 08]
FROM tblMembershipsProcessed
Thanks!