%dim crumb,crumb2 crumb2="Calculate Running Sum Tutorial" crumb1="Calculate Running Sum Query Example" crumb="Calculation Running Sums" %>
Visual Basic Tutorials:
Calculate Running Sum Recordset Example
Here is a fairly simple way to calculate a running sum
using a DAO Recordset operation. To begin, we have created a temporary
table with Absence Dates, and Substitute Teach ID (SubID) - this table was
created via a previous query not shown in this example.
Our goal is to determine running sum of substitute records based on absence date (teacher
was absent and therefore a sub worked in this day).
Private Sub Sum_Button_Click()
Dim rst As DAO.Recordset
wksp.rollback ' cancel transactions if there is an
Note that this example also uses Transaction Processing - in this case the time to do the running sum processing was reduced by about 75%.
More examples to come soon...
<% Response.write "Copyright 2000-" & year(now) & " Blue Claw Database Design" %>