longestdrive
Programmer
Hi All
As usual I've run into a brick wall...
I'm trying to get a running total column in a query, using references found here, but each time I try and execute the query it crashes Access (version 2003). No error messages produced.
The query is based on another query that totals monthly records using "group by" gouping on the month. I'm using the Month (which is mm/yy) as my unique key for the running total.
Here's my query:
SELECT RptMonth, Planned, Actual, (SELECT Sum(qry_YTD.Planned) AS TotalPlanned FROM qry_YTD WHERE qry_YTD.RptMonth <= T1.RptMonth) AS TotalPlanned
FROM qry_YTD AS T1;
I haven't a clue where I'm going wrong - can anyone help please?
As a final note - I eventually want to use this report as the basis for a chart in a report - A column representing each months Planned and a line for the cumulative planned
Thanks
As usual I've run into a brick wall...
I'm trying to get a running total column in a query, using references found here, but each time I try and execute the query it crashes Access (version 2003). No error messages produced.
The query is based on another query that totals monthly records using "group by" gouping on the month. I'm using the Month (which is mm/yy) as my unique key for the running total.
Here's my query:
SELECT RptMonth, Planned, Actual, (SELECT Sum(qry_YTD.Planned) AS TotalPlanned FROM qry_YTD WHERE qry_YTD.RptMonth <= T1.RptMonth) AS TotalPlanned
FROM qry_YTD AS T1;
I haven't a clue where I'm going wrong - can anyone help please?
As a final note - I eventually want to use this report as the basis for a chart in a report - A column representing each months Planned and a line for the cumulative planned
Thanks