Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pulling totals from sub-reports to main reports

Status
Not open for further replies.

jaaret

Instructor
Jun 19, 2002
171
This is a follow up to thread703-1466592.

My original question:
I have a text box named txtRevCreditAmt on a main form that is pulling sub-report totals into the detail of each order:

=rsubOrderCredit.Report!txtTotalCreditAmt

Is there a way to create a sum of this value at the end of the main report?

Superstar Duane Hookom responded:
You can try duplicating the current text box and set a running sum. Then add a text box in the report footer with a control source of the running sum text box name.

This worked, but I just discovered that the text box in the report footer is not always displaying the maximum running sum. Sometimes it returns the second or third to the last record's sum rather than the final record's sum. Why would it do this and is there a way to ensure that it returns the last record's sum?

Jaaret
 
Normally a summed value from a report record source can be created in a totals query that results in a single record. You should be able to create such a query and then join it into the record source of your main report. This would eliminate the need for the running sums.

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top