Sort on calculated currency field

realnine

Registered User.
Local time
Today, 14:02
Joined
Jun 10, 2003
Messages
40
I have a querry to list sources and the total amount due. The Table is dispatch, the fields used are source,AmtBilled,AmtCredit,AmtPaid

SELECT DISTINCTROW Dispatch.Source,
Sum(Dispatch.AmtBilled) AS [Sum Of AmtBilled],
Sum(Dispatch.AmtCredit) AS [Sum Of AmtCredit],
Sum(Dispatch.AmtPaid) AS [Sum Of AmtPaid],
[Sum Of AmtBilled]-[Sum Of AmtCredit]-[Sum Of AmtPaid] AS TotalDue
FROM Dispatch
GROUP BY Dispatch.Source;

I tried sort asscending undet the calculated field totalDue. When I run it , Access prompts for parameter value TotalDue

Any knowledge out there to do this withour the prompt
 
Create a new query based on your Totals query and sort it.

hth,
Jack
 
Thanks Jack,
The additional querry does the trick. I don't understand why it is necessary but it works.

Realnine
 
How can Access sort when it doesn't yet have something to sort on? Once the calculation is finished then Access can sort on a field but while the calculation is going on there is no way to know where in the sort order that current record will end up....

Jack
 

Users who are viewing this thread

Back
Top Bottom