Reva said:
The report consists of four major columns/fields [Description], [Rate],
[Qty] and [ExtendedPrice] which using a query is the sum of [Rate]8[Qty]. I
need to show the total of the [ExtendedPrice] column per page. Through trial
and error I found how to carry forward a balance creating a cumulative total
at the end of each page (using the Running Sum in the field properties);
however the report needs to show the total of each page separately i.e. Total
Page 1, Total Page 2, etc. I tried writing a short code but the only help I
could find on that subject did not apply to Access 2007 only 2002/2003.
Almost any code that works in an earlier version will work
in a later version.
I don't know what you found, but there are some ridiculously
complicated ways out there. I think the simplest way is to
use code like the following:
Private Sub PageFooter_Print(Cancel As Integer, PrintCount
As Integer)
Me.txtPageAmt = Me.txtRunAmount - Me.txtPageRunTotal
Me.txtPageRunTotal = Me.txtRunAmount
End Sub
Private Sub ReportHeader_Print(Cancel As Integer, PrintCount
As Integer)
Me.txtPageRunTotal = 0
End Sub
where:
txtRunAmount - the running sum text box in the
detail section
txtPageRunTotal - an invisible page footer text box just
used in the above calculation
txtPageAmt - the page footer text box that displays the
page total