Hi guys
I have the following query that displays the selected data as a Pivotchart.
DoCmd.OpenQuery "qPaymentsQueryJustMonth", acViewPivotChart
I action the about via an VBA Event.
This all works fine
The graph displays the "Sum of Payments Amount" on a monthly graph just for all the months of January for every year.
I want to use the same query but pass the month number (eg: 2,3,4,5,6,7,8,9,10,11,12)
I have tried to figure this out but can't.
Dim sWhere As String
sWhere = "[PaymentDate] = "DatePart("m",[PaymentDate]) = 1"
DoCmd.OpenQuery "qPaymentsQueryJustMonth", acViewPivotChart
Any help would be greatly appreciated.
Cheers
Greg
I have the following query that displays the selected data as a Pivotchart.
DoCmd.OpenQuery "qPaymentsQueryJustMonth", acViewPivotChart
I action the about via an VBA Event.
This all works fine
The graph displays the "Sum of Payments Amount" on a monthly graph just for all the months of January for every year.
I want to use the same query but pass the month number (eg: 2,3,4,5,6,7,8,9,10,11,12)
I have tried to figure this out but can't.
Dim sWhere As String
sWhere = "[PaymentDate] = "DatePart("m",[PaymentDate]) = 1"
DoCmd.OpenQuery "qPaymentsQueryJustMonth", acViewPivotChart
Any help would be greatly appreciated.
Cheers
Greg