Discussion Locked

Access97 Sorting

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

How do I SORT SUBTOTALS in Access97? I want to create a report that ranks clients by revenue. Some clients, however, have many "sub-clients" under them, which make up a total revenue number for the particular client.
I thus want to sort on the TOTAL for each client and want to make sure all the data that is included in the subtotals will stay in tact and "follow" the subtotal when sorted.

5 replies

by mcthaker

You can only sort on the main fields of the reports, so a work round could be to generate a query for your main report which totals the sub-client totals for each main client and use that as a hidden field to sort on.
Query1: main extract query, eg: Main client details.
Query2: sub-totals query, with ClientID and totals only
Query3: Merge Query1 and Query2 possibly with a outerjoin
Design report on Query 3 and sort on the totals column, but hide the field.
You can insert the sub-clients asa sub-report and still total these.

by james_randy

The first answer looks good to me. If that doesn't work, try something else. Hope this helps.

This discussion is closed to new replies.