Hi
I am trying to create a running sum in a query based on both months and years where both fields are integers.
My expression is "RunTot: DSum("TotalSales","QrySalesbyMonthandYear","Month<=" & [month] And "Year<=" & [Year])".
This seems to work when I only use the month criteria but when I add the year criteria it then sums all lines in the query as the running sum.
Is there something wrong with the syntax of this expression?
Many thanks
I am trying to create a running sum in a query based on both months and years where both fields are integers.
My expression is "RunTot: DSum("TotalSales","QrySalesbyMonthandYear","Month<=" & [month] And "Year<=" & [Year])".
This seems to work when I only use the month criteria but when I add the year criteria it then sums all lines in the query as the running sum.
Is there something wrong with the syntax of this expression?
Many thanks