Hi all
i have been struggling for a while with this problem, and can't get my head around how to solve it.
I have a form called "this months out goings by supplier" that lists all of our outward spend by category and supplier, this is listed by entry date and the transaction amount.
on this form is a pie chart that plots in graphical form the payments to each supplier.
this form is created from this query called Expenses
SELECT [Transactions Extended].[Entry Date], Month([Entry Date]) AS [Income Date], [Transactions Extended].Payment, [Transactions Extended].Categories.ID, [Transactions Extended].[Income/Expense], [Transactions Extended].Taxable, [Transactions Extended].Code, [Transactions Extended].[Account Description], [Transactions Extended].[Default VAT Rate], [Transactions Extended].[Display in Sales], [Transactions Extended].[Display in Purchases], [Transactions Extended].[Account Transactions].ID, [Transactions Extended].[Entry Title], [Transactions Extended].Category, [Transactions Extended].[Total Payment], [Transactions Extended].[Recipt Attachment], [Transactions Extended].[Actual Amount], [Transactions Extended].[Entry Number]
FROM [Transactions Extended]
WHERE (((Month([Entry Date]))=Month(Now())) AND (([Transactions Extended].Payment)>0) AND (([Transactions Extended].Categories.ID) Not Like 86) AND (([Transactions Extended].[Income/Expense]) Not Like "Revenue") AND ((Year([Entry Date]))=Year(Now())));
this works really well and im very happy with it, except i can't find a way of moving back and forth between the months except for setting my computers date "that's not very convenient"
what i would like is a way that i can by clicking buttons on the form show last months results, or if i click the button again show the month before that to.
i think that i may have to add the query to a buttons on-click event, but i can't get my head around how to put the query into VBA.
any help would be most appreciated
Many Thanks
Steve