title: MS Access 2010 Running Total in Query
body: <p>I am not a big Access fan but for this project I was asked to create an Access database. I created something similar for other database types so it wasn't too difficult. I have most of it figured out but the running totals are racking my head.</p>
  
  <p>I have the table below: table name <code>attendanceView</code></p>
  
  <p>Query: <code>SELECT * FROM attendanceView</code></p>
  
  <pre><code>======================================================================================
  agentID    |     incurrredDate     |   points    |    OneFallOff     |    TwoFallOff
  ======================================================================================
  chtall     |       10/7/2013       |     2       |       2           |        2
  chtall     |       10/15/2013      |     2       |       2           |        2
  chtall     |       11/26/2013      |     2       |       2           |        2
  chtall     |       12/17/2013      |     2       |       2           |        2
  vimunson   |       7/22/2013       |     2       |       2           |        2
  vimunson   |       7/29/2013       |     2       |       1           |        1
  vimunson   |       12/6/2013       |     1       |       1           |        1
  </code></pre>
  
  <p>This query does what it needs to do to find the values for <code>OneFallOff</code> and <code>TwoFallOff</code>. However I need to find a way to run a running total of <code>TwoFallOff</code> for each <code>agentID</code>. For example <code>chtall</code> has four records, see below, this what it should look like:</p>
  
  <pre><code>==================================================================================================
  agentID    |     incurrredDate     |   points    |    OneFallOff     |    TwoFallOff     |   total
  ==================================================================================================
  chtall     |       10/7/2013       |     2       |       2           |        2         |    2
  chtall     |       10/15/2013      |     2       |       2           |        2         |    4
  chtall     |       11/26/2013      |     2       |       2           |        2         |    6
  chtall     |       12/17/2013      |     2       |       2           |        2         |    8
  vimunson   |       7/22/2013       |     2       |       2           |        2         |    2
  vimunson   |       7/29/2013       |     2       |       1           |        1         |    3
  vimunson   |       12/6/2013       |     1       |       1           |        1         |    4
  </code></pre>
  
  <p>I've tried <code>DSUM()</code> which did not work, or maybe I was using it wrong. In case it isn't clear in the table the <code>total</code> column resets back to 0 when the agent changes.</p>