=Sum([fieldName]) on Page Footer - will not work!

musicmaker

Registered User.
Local time
Today, 16:55
Joined
Jun 29, 2000
Messages
17
I need to report the page total at the bottom of each page.

=Sum([fieldName]) works great on the Report Footer. (Last page only)

Does anyone know a way to calculate a field's total for each page in a report?

Thank you in advance for any help!!!
 
Following article in Microsoft knowledge base explains how to do it Article ID: Q132017
 
Richie, Thank you so much for the above information. Q132017 refers to ACCESS 97. Q210261 is for ACCESS 2000.

The web site is: http://search.support.microsoft.com/kb/c.asp

Below is how it is done:

The field name in this example is: UnitPrice

There are five steps:

1.) Insert a text box in DETAILS section. Set the properties as follows:
· Name: RunSum
· Control Source: UnitPrice
· Visible: No
· Running Sum: Over All
· Format: Currency

2.) Insert a text box in PAGE FOOTER section. Set the properties as follows:
· Name: PageSum
· Format: Currency

3.) Choose CODE from the VIEW MENU.
· Top left pulldown, set to (General)
· Top right pulldown, set to (Declarations)
· Insert the following: Dim x As Double

4.) Right click on the PAGE FOOTER bar and activate the PAGE FOOTER properties.
· Click EVENT, then click OnPrint
· Insert the following code:
Me!PageSum = Me!RunSum – x
x = Me!RunSum

5.) Right click on the REPORT HEADER bar and activate the REPORT HEADER properties:
· Click EVENT, then click OnPrint
· Insert the following code:
x = 0

The PageSum text box will produce the total of [UnitPrice] at the bottom of each page, for that page only.

The RunSum text box will produce the running total of [UnitPrice]on the bottom of each Page.
 

Users who are viewing this thread

Back
Top Bottom