
Originally Posted by
June7
Did lot more edits on that post. Review again.
I know you're probably sick of looking at this, but I have one more quick question to ask you: Is it possible to add additional criteria to this median query? Right now the output is really close to what I want. It returns the fields Median, Age, Sex, and Marital status. But the Medians its calculating is only based on age. So in the output a 35 year old married female will have the same median as a 35 year old single male. I assume thats because in my code:
Code:
SELECT DMedian("PolRate","Query5","Age=" & [Age]) AS MedRate, Query5.Marital, Query5.Age, Query5.Sex
FROM Query5
GROUP BY Query5.Marital, Query5.Age, Query5.Sex;
The only criteria is age. I try to add more but my function Dmedian only calls for three arguments. And I haven't found a way to add more to that module without getting an error. Any ideas?