RollingAverages.MDB |
Post Reply |
Author | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Roger Carlson
Microsoft MVP Joined: 20 Feb 2008 Status: Offline Points: 261 |
Post Options
Thanks(0)
Posted: 30 Dec 2010 at 9:41am |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Update: Added detailed documentation
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sponsored Links | Want a good read? Try The Summer of His Life (available on Amazon!) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Roger Carlson
Microsoft MVP Joined: 20 Feb 2008 Status: Offline Points: 261 |
Post Options
Thanks(0)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Please consider donating $1 per sample downloaded, find out why here.
RollingAverages.MDB
This sample illustrates two different ways to create a "Rolling Average" query. It averages the latest 13 months in the sequence.
The first two use DCount and the second two use a Sub Query. You must identify a unique column in the query to create the sequence on. I used an autonumber ID field, which while in order, has gaps in it.
The DCount method creates an updateable recordset. The SubQuery method produced non-updateable recordsets. Download Access 2000-2007 (mdb): RollingAverage.zip
Download Access 2007-2010 (accdb): RollingAverage07.zip
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |