Sorting records based on the results of functions with a report

mtairhead

Registered User.
Local time
Today, 15:11
Joined
Oct 17, 2003
Messages
138
I'm not sure where to begin, and I have no idea what sort of search terms I would use for this:

If I have a report grouped by a text field, and the group footer counts the number of records in that group, is there any way to sort the records within that group by number of occurances? Basically, the group that has the most records in it needs to be first. The group that has the least needs to be last.

Thanks for any help...

Andrew
 
Is there a query underlying the report?

If so, unless I'm missing something (and it wouldn't be the first time) add:
1) a grouping clause (whatever the category is that you want to count by) 2) a count of all records within that group.

e.g. if the query were currently returning two fields - say, Animal Species and Gender - change it to also group by Animal Species, then add Count(*).

You could then order the results by the Count(*) field, in descending order.
 
You likely aren't far off - I just have never done it.

You're saything that I add a grouping clause in my query? There is a query behind the report....I just haven't ever grouped via query before. Is this something that I must do via SQL, or can I use the regular query design view?

...Help's keywords for "Grouping Clause" hasn't gotten me far...

un-access-schooled,

Andrew
 
erp - never mind. Figured it out!

Thanks!

Andrew
 

Users who are viewing this thread

Back
Top Bottom