Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sort by Count of sub group

Status
Not open for further replies.

abradford

MIS
Oct 12, 2006
31
US
Hello

I have a report which displays records by instance group. I have a box =count[response] in the header of each instance group. How can I sort the report to display by that =count[response] box?

I have tried the grouping and sorting:

[Response] descending
=count[response] descending

but this is obviously wrong...
thanks!!!
 
What if you just did count[response] as the first group header? Right now you have response as a group header and then the count.
 
You can't sort a report based on an aggregate calculation in the report. You can create a totals query that is similar to your report's record source but groups by the field in your grouping. Count something in the totals query. Add this query to your report's record source so you can sort on the CountOfSomething.

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]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top