Using a Median Function in a Group Query

I want to calculate the Median Score for each Region in the table below. Some Regions have 3 values, others only 2. There is no Median function in Access. I have tried downloading several functions but they only give me the Median over the entire table not the one for each Region. For example the East with Scores of 36, 45 and 68 would have a Median of 45 while the West with Scores of 60 and 90 would have a Median of 75 (if number of observations is even, then average of the middle 2).

tbl_Test

Region Score
East 45
South 65
North 71
West 60
East 36
South 35
North 92
West 90
East 68
South 55

I'm looking for a VBA Median Function and an accompanying group query that uses the Function to give me Median Scores for EACH of the four Regions.

Popular White Paper On This Topic

In Microsoft Access, you can create user functions that you can use in an SQL statement. Implement one of the Median functions you have downloaded, and use it as an aggregate function in a query that uses a Group By clause to collect the records for each Region.