Home  Fees/Services  Access Examples  Tutorials  Access Download  Articles  Search  Forums  Blockchain Tech  Contact  Privacy  Links
Access Report Examples
<% dim Page_Type Page_Type="Prog" %> <% dim Gnum,Ynum Gnum="6545291261" Ynum="26695" %>

Access Report Design Tutorials

Report Line Counter
Change Line Color
Report Running Sum
Report Page Subtotals
Graphics Overlay
Dynamic Crosstab
Report Mail Merge

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.


Contact Information

Microsoft Access 2013 2010 All Windows Versions

Blue Claw Database Design