Median.mdb (intermediate) |
Post Reply |
Author | |
Roger Carlson
Microsoft MVP Joined: 20 Feb 2008 Status: Offline Points: 261 |
Post Options
Thanks(0)
Posted: 26 Aug 2011 at 9:14am |
8/25/2011
FIX: Removes records with NULL values in the Field from the recordset.
|
|
|
|
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.
Median.mdb
Surprisingly, Access has no Median function, so you have to write one of your own. This sample database shows how to do that.
You use the function much like the built-in Domain functions (DLookUp, DMax, and so on). That is, you must provide the 1) field name, 2) table name, and 3) a 'Where' Criteria. When used in an aggregate query (see below) you MUST add each field 'grouped by' into the Where Criteria. See Help for more on Domain Aggregate functions. There are modules that show both DAO and ADO methods, but ADO is the only method used here. Go to the appropriate module to see the code. Download |
|
|
|
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 |