MemphisVBA
Technical User
I am trying to get a count and sum on invoices for each month that were not paid (i.e. sent to AP) for that month. I have a query that works fine for 1 month at a time, but is there a way to combine the past 12 months (May '05 to May '06 in this case) into just one query?
Here is my (one month at a time) query:
Thanks in advance!
Here is my (one month at a time) query:
Code:
SELECT Sum(IIf([InvDate] Between #3/1/2006# And #3/31/2006#,[totalinv],0)) AS [MAR-06 Amnt], Count(IIf([InvDate] Between #3/1/2006# And #3/31/2006#,[totalinv],0)) AS [MAR-06 Count]
FROM data
WHERE (([data]![DateSentToAP]>#3/31/2006#) AND (((([data].[InvDate]) Between #3/1/2006# And #3/31/2006#) And (([data].[DateSentToAP])>#3/31/2006#))));
Thanks in advance!