I have a field called txtPerformanceAverage on a report, which is calculated thus: =Avg([Performance]). How do I get it to display the top 10 results????
Do you want to display on the top 10 averages or do you want to display the details and the averages of the top 10?
If I understand correctly, you can create a totals query that groups by your grouping in your report and averages Performance.
For instance in the Northwind, if you wanted the 10 customers with the highest average freight in the Orders table:
Code:
SELECT TOP 10 Orders.CustomerID, Avg(Orders.Freight) AS AvgOfFreight
FROM Orders
GROUP BY Orders.CustomerID
ORDER BY Avg(Orders.Freight) DESC;
Save this query and add it to the record source of your report and join the field equivalent to CustomerID.
Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.