S
Stacey Crowhurst
Hi. My query "qryInitialRevisedCurrentBudgetCombined" is the basis for my
report "rptBudgetsCombined". The query SQL is below. I created a form that
enables the user to select one or more project status's (pstStatusID). For
example they could select feasibility and construction. Then they use a
command button to open the "rptBudgetsCombined" report, which sums the budget
data for all projects fitting the status criteria.
My problem is that I need the pstStatusID field in the query for the filter
to work. However, having it in the query creates 'duplicate' rows on my
report. The report looks like the following:
Budget Code & Desc Initial Budget Revised Budget Current Budget
1002 AV Systems $500,000 $0 $500,000
1002 AV Systems $150,000 $50,000 $200,000
(showing me a row for each pstStatusID)
I tried to troubleshoot online to find a solution that would present the
data as follows:
Budget Code & Desc Initial Budget Revised Budget Current Budget
1002 AV Systems $650,000 $50,000 $700,000
I think the Group by Rollup function would do the trick but I don't know
that you can use it with Access 2003 SP3. Any help on the rollup function or
other ideas is greatly appreciated. THANKS!
SQL-
SELECT qryInitialRevisedCurrentBudget.Type,
qryInitialRevisedCurrentBudget.budBudgetCodeID,
qryInitialRevisedCurrentBudget.bcBudgetCodeDesc,
Sum(qryInitialRevisedCurrentBudget.InitialBudget) AS [Initial Budget],
Sum(qryInitialRevisedCurrentBudget.RevisedBudget) AS [Revised Budget],
Sum(qryInitialRevisedCurrentBudget.CurrentBudget) AS [Current Budget],
qryInitialRevisedCurrentBudget.pstStatusID
FROM qryInitialRevisedCurrentBudget
GROUP BY qryInitialRevisedCurrentBudget.Type,
qryInitialRevisedCurrentBudget.budBudgetCodeID,
qryInitialRevisedCurrentBudget.bcBudgetCodeDesc,
qryInitialRevisedCurrentBudget.pstStatusID;
report "rptBudgetsCombined". The query SQL is below. I created a form that
enables the user to select one or more project status's (pstStatusID). For
example they could select feasibility and construction. Then they use a
command button to open the "rptBudgetsCombined" report, which sums the budget
data for all projects fitting the status criteria.
My problem is that I need the pstStatusID field in the query for the filter
to work. However, having it in the query creates 'duplicate' rows on my
report. The report looks like the following:
Budget Code & Desc Initial Budget Revised Budget Current Budget
1002 AV Systems $500,000 $0 $500,000
1002 AV Systems $150,000 $50,000 $200,000
(showing me a row for each pstStatusID)
I tried to troubleshoot online to find a solution that would present the
data as follows:
Budget Code & Desc Initial Budget Revised Budget Current Budget
1002 AV Systems $650,000 $50,000 $700,000
I think the Group by Rollup function would do the trick but I don't know
that you can use it with Access 2003 SP3. Any help on the rollup function or
other ideas is greatly appreciated. THANKS!
SQL-
SELECT qryInitialRevisedCurrentBudget.Type,
qryInitialRevisedCurrentBudget.budBudgetCodeID,
qryInitialRevisedCurrentBudget.bcBudgetCodeDesc,
Sum(qryInitialRevisedCurrentBudget.InitialBudget) AS [Initial Budget],
Sum(qryInitialRevisedCurrentBudget.RevisedBudget) AS [Revised Budget],
Sum(qryInitialRevisedCurrentBudget.CurrentBudget) AS [Current Budget],
qryInitialRevisedCurrentBudget.pstStatusID
FROM qryInitialRevisedCurrentBudget
GROUP BY qryInitialRevisedCurrentBudget.Type,
qryInitialRevisedCurrentBudget.budBudgetCodeID,
qryInitialRevisedCurrentBudget.bcBudgetCodeDesc,
qryInitialRevisedCurrentBudget.pstStatusID;