Can't you do the "calculation on the recordset only to determine the order to display" in the query?
Please provide more detail.