O
Opal
I am running access 2003 and have a report
I want to sort based on the results of a calculated
field.
My SQL behind the report is:
SELECT DISTINCT ScrapData.PartNo, ScrapData.Description,
ScrapData.CostCtr, ScrapData.Quantity, ScrapData.ScrapDate
FROM ScrapData
GROUP BY ScrapData.PartNo, ScrapData.Description, ScrapData.CostCtr,
ScrapData.Quantity, ScrapData.ScrapDate
HAVING (((ScrapData.ScrapDate) Between [Forms]![frmSelectCC]!
[FromDate] And [Forms]![frmSelectCC]![ToDate]));
I then have my report grouped by the PartNo field as I
have a calculated field =Sum([Quantity]) for each part.
Now, my Manager wants to sort the report by largest
to smallest based on this =Sum([Quantity]) field.
Its not part of the query, so how do I sort my report
based on this field?
I want to sort based on the results of a calculated
field.
My SQL behind the report is:
SELECT DISTINCT ScrapData.PartNo, ScrapData.Description,
ScrapData.CostCtr, ScrapData.Quantity, ScrapData.ScrapDate
FROM ScrapData
GROUP BY ScrapData.PartNo, ScrapData.Description, ScrapData.CostCtr,
ScrapData.Quantity, ScrapData.ScrapDate
HAVING (((ScrapData.ScrapDate) Between [Forms]![frmSelectCC]!
[FromDate] And [Forms]![frmSelectCC]![ToDate]));
I then have my report grouped by the PartNo field as I
have a calculated field =Sum([Quantity]) for each part.
Now, my Manager wants to sort the report by largest
to smallest based on this =Sum([Quantity]) field.
Its not part of the query, so how do I sort my report
based on this field?