Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Oct 2001
    Location
    Suffolk, England
    Posts
    134
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Median Values (Access 2000)

    I understand that the median value in a goup of records is the middle value. Is there any way I can ask Access to calculate this in a query - I want to do this on a monthly basis so the recordset is of varying size
    Thanks
    Allison

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Median Values (Access 2000)

    Alison,

    There is no built-in Median function in Access. To calculate it, you must use a custom VBA function. I have attached a text file that contains the code for such a function. You can copy the contents of the text file and paste them into a standard module.

    Note: the code uses DAO, so you must set a reference to the Microsoft DAO 3.6 Object Library in the Tools | References... dialog (in the Visual Basic Editor)

    You can then use this function in expressions in queries and controls. The text file contains an example.
    Attached Files Attached Files

  3. #3
    2 Star Lounger
    Join Date
    Oct 2001
    Location
    Suffolk, England
    Posts
    134
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Median Values (Access 2000)

    Thanks very much
    Allison

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •