Good day.
I have a developed a query with a field called MaxScores. I have another field which ranks the MaxScores 1 thru n based on the value in the scores. I use the following statement to rank the MaxScores:
My problem is this: The query is the recordsource for a form. When I open the form using the OpenForm method, I feed a parameter to the query in the Where argument that specifies the string Field Region in the same query.
When the query is executed, only the desired region appears (GOOD!) however the ranking is for all the regions. I want the rank to reflect the relative ranking for that region and not the whole project area.
To be more clear. The MaxScore for Site1 in Region1 is 101, which is Rank1 in Region1, but is Rank 4 when all regions are looked at. Now I get the value of 4 returned when I run the query, but I want it to return 1.
Any ideas??
All help is appreciated.
DJ
I have a developed a query with a field called MaxScores. I have another field which ranks the MaxScores 1 thru n based on the value in the scores. I use the following statement to rank the MaxScores:
Code:
Ranking: (SELECT Count(*) FROM [rqryMaxScores-8] Where [MaxScore]>[AliasMaxScores-8].[MaxScore])+1
My problem is this: The query is the recordsource for a form. When I open the form using the OpenForm method, I feed a parameter to the query in the Where argument that specifies the string Field Region in the same query.
When the query is executed, only the desired region appears (GOOD!) however the ranking is for all the regions. I want the rank to reflect the relative ranking for that region and not the whole project area.
To be more clear. The MaxScore for Site1 in Region1 is 101, which is Rank1 in Region1, but is Rank 4 when all regions are looked at. Now I get the value of 4 returned when I run the query, but I want it to return 1.
Any ideas??
All help is appreciated.
DJ