Article ID: 132017 - Last Review: January 19, 2007 - Revision: 2.3 ACC: How to Sum a Column of Numbers in a Report by PageThis article was previously published under Q132017 Moderate: Requires basic macro, coding, and interoperability skills.
On This PageSUMMARY
In a Microsoft Access report, you can sum a column of numbers by group or
over the entire report, but there is no built-in way to print the sum of a
column on each page of a report. This article shows you how you can use
code to print the sum of a column of numbers on each page of a report. The
code assumes the field that you are summing is numeric.
This article assumes that you are familiar with Visual Basic for Applications and with creating Microsoft Access applications using the programming tools provided with Microsoft Access. For more information about Visual Basic for Applications, please refer to your version of the "Building Applications with Microsoft Access" manual. NOTE: Visual Basic for Applications is called Access Basic in Microsoft Access version 2.0. For more information about Access Basic, please refer to the "Building Applications" manual. NOTE: This article explains a technique demonstrated in the sample files, RptSampl.exe (for Microsoft Access for Windows 95 version 7.0) and RptSmp97.exe (for Microsoft Access 97). For information about how to obtain these sample files, please see the following articles in the Microsoft Knowledge Base: MORE INFORMATION
You can print the sum of a column on each page of a report in two ways.
You can sum the column of each page, and then add the total to the total
of each subsequent page (a running sum). Or you can sum the column of each
page separately.
Creating the Report to Be Used in the ExamplesIn Microsoft Access 7.0 and 97
Adding the Total to the Total of Each Subsequent Page (a Running Sum)To add the total to the total of each subsequent page in Microsoft Access 2.0, 7.0, and 97, follow these steps:
Summming the Column of Each Page SeparatelyTo sum the column of each page separately in Microsoft Access 2.0, 7.0, and 97, follow these steps:
REFERENCES
For more information about running sums search the Help Index for "Running
sum," or ask the Microsoft Access 97 Office Assistant.
APPLIES TO
| Article Translations
|

Back to the top
