Median from a Query

S

Shawn Sumpter

Sorry, I posted this to another thread before I realized that this forum
sorts by original post date and not by activity date so this is a repost.

The orignial thread clarified some problems users were having with the
module code posted in the Knowlege Base regarding median calculation.

Original post title "How do I retreive the median value of a field?"

Thank you for having this discussion. I have been able to follow up until
this point. I get a "Run-time error '3061: Too few parameters. Expected 1."
message.

Perhaps the reason is that I am trying to get a median for values in a query?

Background> MSAccess 2000
data is water quality testing with some values reported as less than the
testing method is able to detect. Not 0 but say <2. It could be 1.9999 for
all we know. Anyway this results in having to store < in a separate field
and calculate fields treating the < value as 0. I did not want to store this
false data in the table so I created a calculated field in a query. I need
to run the query anyway for the user input month and year. I am doing
monthly reporting for daily results but need to store all of the historical
data in a single table.

Does this median module only work if the data is directly from a table?

I thought perhaps it did not like a query calculated value field so I did
store the "false" data in a field in the database. It did not change
anything.

The query name and field are passed to the module from a textbox in my report.

Control source =Median("Sample_Data_Single_Month","E1_colival")

Your patience and assistance is appreciated.
 

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