Print Page | Close Window

RunningSumInQuery.mdb (beginner)

Printed From: Roger's Access Library
Category: Roger's Access Library
Forum Name: Roger's Download Samples
Forum Description: A compendium of Microsoft Access 97 and 2000+ routines, each separated into its own sample database.
Printed Date: 21 Mar 2018 at 4:02am

Topic: RunningSumInQuery.mdb (beginner)
Posted By: Roger Carlson
Subject: RunningSumInQuery.mdb (beginner)
Date Posted: 23 Jun 2016 at 7:01am
This sample illustrates how to create a Running Sum in a query.
It shows how to:
 1) Create a running sum over the entire table
 2) Create a running sum over a group.  In this case, the group is the OrderID field.
There are two methods shown here: Using a 1) correlated subquery and 2) DSum domain aggregate function.  The correlated subquery
is the faster method, but it returns a non-updateable recordset.  The Dsum method is slower, but the recordset is updateable.
HOWEVER, it should be noted that against a large dataset, neither method will be very fast!
Documentation included.

Access 2003 (.mdb):" rel="nofollow -
Access 2010 (.accdb):" rel="nofollow - Consider donating $1 per sample downloaded," rel="nofollow - find out why here .<

Posted By: carlrj
Date Posted: 23 Jun 2016 at 7:04am
Updated 2010 version

--Roger Carlson" rel="nofollow -

Print Page | Close Window