ACC: How to Sum a Column of Numbers in a Report by PageLast reviewed: October 24, 1997Article ID: Q132017 |
The information in this article applies to:
SUMMARYModerate: Requires basic macro, coding, and interoperability skills. 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 demonstrates how you can use code to print the sum of a column of numbers on each page of a report. It 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:
ARTICLE-ID: Q145777 TITLE : ACC95: Microsoft Access Sample Reports Available on MSL ARTICLE-ID: Q175072 TITLE : ACC97: Microsoft Access 97 Sample Reports Available on MSL MORE INFORMATIONYou 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. For both approaches, first follow these steps.
In Microsoft Access 7.0 and 97
In Microsoft Access version 2.0
In Microsoft Access 2.0, 7.0, and 97To add the total to the total of each subsequent page, follow these steps:
REFERENCESFor more information about running sums search the Help Index for "Running sum," or ask the Microsoft Access 97 Office Assistant. Keywords : kbusage Version : 2.0 7.0 97 Platform : WINDOWS Hardware : x86 Issue type : kbhowto |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |