Sorting records by a calculated field

  • Thread starter Thread starter Hans Recter
  • Start date Start date
H

Hans Recter

We are running a competition in which entrants come from various schools.

What I need to do is create a report which lists the top 10 entries from
each school and then gives a total of the 10 so we can determine which is
the top school.

I originaly posted this question on another newsgroup and received help on
restricting the report to the top 10 records and thought that was the end of
my problems.

I now have a report with all the schools with a sub report listing the top
10 scores and a calculated field with the sum of the 10 scores.

What I now need to do is sort the report by the totals. Does anyone know how
to do this?

Thanks in advance for any help
Hans
 
To sort by the total, the total will need to be in the source query.

One way to do that would be to use a DSum() expression to get the totals, as
a calculated field in the query.

Another would be a create a Totals query that calculates the totals, and
then add it as a source "table" to your query.
 
Back
Top