summing a column

A

Anita

Good Morning, I would like to sum a column of numbers for each page
separately in my report. The report is approx 7 pages long. I have a Grand
Total at the end of the report working well. I can get a running sum working
but I would like each page to have a page total.

Thanks for your help, Anita
 
M

Marshall Barton

Anita said:
Good Morning, I would like to sum a column of numbers for each page
separately in my report. The report is approx 7 pages long. I have a Grand
Total at the end of the report working well. I can get a running sum working
but I would like each page to have a page total.


There's nothing built in that makes it easy to do that so it
will take a little code.

Assuming you named your detail section RunningSum text box
txtRunAmt and your page footer text box that displays the
page total txtPageAmt, add another (hidden) text box (named
txtPageRunTotal) to the page footer section.

Then add a line of code to the Report Header section's
Format event:
Me.txtPageRunTotal = 0
and two lines of code to the PageFooter section's Format
event:
Me.txtPageAmt = Me.txtRunAmount - Me.txtPageRunTotal
Me.txtPageRunTotal = Me.txtRunAmount
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top