Ranking the results of a report or query

  • Thread starter Thread starter NeilFrog
  • Start date Start date
N

NeilFrog

Hi,

Ive produced some reports in Access. Id like to rank the results.. IE. 1, 2,
3 etc through 10.

Can anyone tell me how to add a ranking?

Thanks,

Neil
 
Assuming that you've got a field in your query that you're sorting on to
determine their order (call it SortOrder for the sake of illustration), one
approach is to add

DCount("*", "MyTable", "SortOrder <= " & [SortOrder]) AS Rank

as a computed field. (This assumes you're sorting in ascending order. Note
that this can be slow, especially when you have a large number of records.)
 
Back
Top