S
SteveS
I posted this problem previously, received a solution that I thought would
work but it became too large and received a "Query is too complex" error. So,
I'd like to approach this a different way:
I have created a Union Query to consolidate results from separate queries,
each one of which represents results for a single month:
SELECT ReportMonth, MonthlyRev, MonthlyCost
FROM qryMonth1Total
UNION
SELECT ReportMonth, MonthlyRev, MonthlyCost
FROM qryMonth2Total
UNION
SELECT ReportMonth, MonthlyRev, MonthlyCost
FROM qryMonth3Total;
etc. (for 12 months)
Results show as:
ReportMonth MonthlyRev MonthlyCost
01/01/2007 $5000 $550
02/01/2007 $7500 $400
03/01/2007 $3500 $350
etc.
I would like to add running sum columns to the results as follows:
ReportMonth MonthlyRev MonthlyCost MonthlyRevSum MonthlyCostSum
01/01/2007 $5000 $550 $5000
$550
02/01/2007 $7500 $400 $12500
$950
03/01/2007 $3500 $350 $16000
$1300
etc.
Is this possible in my existing union query? Am relatively new to Access
(just read up on subqueries today) so the simpler the better.
Thanks!
Steve
work but it became too large and received a "Query is too complex" error. So,
I'd like to approach this a different way:
I have created a Union Query to consolidate results from separate queries,
each one of which represents results for a single month:
SELECT ReportMonth, MonthlyRev, MonthlyCost
FROM qryMonth1Total
UNION
SELECT ReportMonth, MonthlyRev, MonthlyCost
FROM qryMonth2Total
UNION
SELECT ReportMonth, MonthlyRev, MonthlyCost
FROM qryMonth3Total;
etc. (for 12 months)
Results show as:
ReportMonth MonthlyRev MonthlyCost
01/01/2007 $5000 $550
02/01/2007 $7500 $400
03/01/2007 $3500 $350
etc.
I would like to add running sum columns to the results as follows:
ReportMonth MonthlyRev MonthlyCost MonthlyRevSum MonthlyCostSum
01/01/2007 $5000 $550 $5000
$550
02/01/2007 $7500 $400 $12500
$950
03/01/2007 $3500 $350 $16000
$1300
etc.
Is this possible in my existing union query? Am relatively new to Access
(just read up on subqueries today) so the simpler the better.
Thanks!
Steve