page totals

  • Thread starter Thread starter Glen
  • Start date Start date
G

Glen

Is there a simple way to have a sum of a numeric field per page? I've
developed a workaround but it is really cumbersome. I print from 1 to 6
detail lines per page and would like to show a total in the page footer for
just that page... I don't want a running sum.

Right now I have to run a routine to group the records in groups of 6 or
less and assign each a subgroup code... etc. It works but would love a
simpler solution... i.e. have a calculated field in the page footer that is
the sum of the page footer. The problem with doing it in a group footer is
that the group footer floats and the page footer needs to be at the bottom
(think hcfa form).

I am on Access 2007.

My thanks in advance for anyone that can suggest a simple solution.
 
Glen said:
Is there a simple way to have a sum of a numeric field per page? I've
developed a workaround but it is really cumbersome. I print from 1 to 6
detail lines per page and would like to show a total in the page footer for
just that page... I don't want a running sum.

Right now I have to run a routine to group the records in groups of 6 or
less and assign each a subgroup code... etc. It works but would love a
simpler solution... i.e. have a calculated field in the page footer that is
the sum of the page footer. The problem with doing it in a group footer is
that the group footer floats and the page footer needs to be at the bottom
(think hcfa form).

I am on Access 2007.


You need an (invisible?) running sum text box (named
txtRunAmount) in the detail section. You also need an
invisible scratch pad text box (named txtPageRunTotal) in
the page footer.

Then add code like this to the (invisible?) report header
section's Print (or Format) event:
Me.txtPageRunTotal = 0

and this kind of code in the page footer Print (or Format)
event:
Me.txtPageAmt = Me.txtRunAmount - Me.txtPageRunTotal
Me.txtPageRunTotal = Me.txtRunAmount
 
Back
Top