Home  Fees/Services  Access Examples  Tutorials  Access Download  Articles  Search  Contact  Privacy  Links
Access Report Examples



Reports Home


Running Sum in Microsoft Access Report

Continuous Sum MS Access Report Detail Lines

Calculate running sum can be accomplished within an Access report using Access Visual Basic.  Calculation of running sum is also the starting point for calculating most statistical measures. Below are the details for implementing a running sum on a report.

Follow these steps:

  1. Create an unbound field on the report that will hold and display the running sum value.
     

  2. Create an On Print event procedure in the Detail section of the report.
     

  3. In the on print event procedure put a global variable after the 'Option Compare Database'.  In this example it is called 'gbl_run_sum'.
     

  4. Add the code in the Detail_Print procedure as show below.  Each Sales value will be sumed as the report is created.

Calculate Running Sum MS Access Reports

Note that you can also calculate running sum using the running sum property of an unbound field in the detailed section of the report.  We provide this visual basic example because there may be other calculations what you may want to perform within the report and this example gives you the basic skills needed to do the other calcs.  Some examples of other calculations might be calculation of standard deviation, mean, and other statistics.

You can also try out one of our downloadable Access examples and see how a complex sum is calculated in a form.  This technique can also be used in reports.

Download our Inventory Database Example to see the sum calculations.











A Blue Claw Database Design Template:

Customer Relationship Management (CRM) Template
 








A Blue Claw Database Design Article:

MS Access Versus Other Systems
 



Contact Information

Programming Access Reports Examples
Microsoft Access 2010 2007 2003 All Windows Versions