Hi Guys
I have this query that returns all income and expenditure each month
Code:
TRANSFORM Sum(tblAccountTransactions.TotalPayment) AS [SumOfTotal Payment]
SELECT Format([EntryDate],"mmm/yyyy") AS [Month]
FROM tblAccountTransactions
WHERE (((tblAccountTransactions.Category) Is Not Null And (tblAccountTransactions.Category) Not Like 86 And (tblAccountTransactions.Category) Not Like 85 And (tblAccountTransactions.Category) Not Like 90) AND ((tblAccountTransactions.EntryTitle) Not Like "setup")) OR (((tblAccountTransactions.TotalPayment)>0) AND ((Format([EntryDate],"yyyy/mmm")) Between DateSerial(Year(Now()),4,1) And DateSerial(Year(Now()),3,31)+1))
GROUP BY Format([EntryDate],"yyyy/mm"), Format([EntryDate],"mmm/yyyy")
ORDER BY Format([EntryDate],"yyyy/mm")
PIVOT tblAccountTransactions.TransType;
I have tried to filter the results to only show values between the 1st April of this year to the 31st March next year 01/04/2018 - 31/03/2019
i have entered a test payment in October of next year 2019 and its showing in the query results highlighted Red
what will i need to do to olny return values between the dates i require
many thanks for your help
steve
Month |
Money In |
Money Out |
Apr/2018 |
£1,010.00 |
£50.00 |
May/2018 |
£1,010.00 |
£50.00 |
Jun/2018 |
£1,010.00 |
£100.00 |
Jul/2018 |
£1,010.00 |
£50.00 |
Aug/2018 |
£1,010.00 |
£50.00 |
Sep/2018 |
£1,010.00 |
£50.00 |
Oct/2018 |
£1,010.00 |
£50.00 |
Nov/2018 |
£1,010.00 |
£50.00 |
Dec/2018 |
£1,010.00 |
£50.00 |
Jan/2019 |
£1,010.00 |
£50.00 |
Feb/2019 |
£1,010.00 |
£50.00 |
Mar/2019 |
£1,010.00 |
£50.00 |
Oct/2019 |
|
£5,000.00 |