View Full Version : Sorting


mjdavie
09-17-2001, 07:27 AM
Could anybody tell me if it is possible to sort by a text box in a report and if so how can I do it ?
I have a text box which calculates totals within a group but I would like to sort by the total.
Thanks

mph1
09-17-2001, 07:37 AM
Try using the Sorting & Grouping in the design view of the report. Select the field to be sorted and choose ascending.

HTH

mjdavie
09-17-2001, 07:40 AM
My trouble is that it is not a field but a text box and therefore I can't select it from the sorting and grouping option.

mph1
09-17-2001, 08:42 AM
If your report is off a query, which would be the best, the only other thing I can think of is to create a total formula in the query, then choose sorting in query.

HTH

Pat Hartman
09-17-2001, 05:54 PM
Create a totals query that groups and sums the data for each group. Modify the query that you are currently using as the recordsource for the report to include this totals query. Join the two on the appropriate column(s). Then select the summed column for inclusion in the query. Once the field you want to sort on is in the report's recordset, you will be able to sort on it.