Small correction. You don't have to create the field/calculation in the query. You can create the value in the Sorting and Grouping. For instance if you have StartDate and EndDate fields and want to sort by duration you can set the sorting and grouping to:
=DateDiff("D",StartDate, EndDate)
The StartDate and EndDate values must be in the report's record source.
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]