View Full Version : Order report by number of detail records


preggo
08-27-2003, 11:58 AM
I have a report that groups records by one field and counts the number of records per group. I would like to have the group that has the greatest number of records be first on the report and then list the groups (with detail) in a descending order for the number of records in the group. Any help would be greatly appreciated.

Fornatian
08-27-2003, 12:04 PM
Build two queries:

1. Detail query with report fields
2. Count query summing records per group

Join them in a third query joining the grouping fields, use the count return as a hidden sorting field.