calculate median in Access

K

khaymon

I'm using the article: http://support.microsoft.com/kb/210581 to calculate a
median in access. However, I'd like to calculate the median on subsets of
data by using a query. I can't seem to get the code to work with a query
rather than a table. How can I get the module and form to work with a query
rather than a table? or get the median function to work in a query itself?
 
A

Arvin Meyer [MVP]

Save the function in a standard module, labeled with a different name than
the function. Add the Keyword Public in front of function (just in case) In
the query, create a column like:

Expr1: Median("tblMyData","Whatever")

It should work just fine.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top