D
dohernan via AccessMonster.com
I have a Query that looks at 2 tables then fills out 2 fields, Form Type &
Quantity.
I want it to list them by the highest Quantity on down from both tables, and
am not sure where to stick the DESC.
Thanks.
SELECT PersonnelForms2009.[Form Type],
Count(PersonnelForms2009.[Form Type]) AS QTY
FROM PersonnelForms2009
WHERE [Completed] Between Forms!PersonnelFormQueries!StartQueryDate
And
Forms!PersonnelFormQueries!EndQueryDate
GROUP BY PersonnelForms2009.[Form Type]
UNION ALL SELECT tblOtherForms.[Form Type], Sum(Qty)
FROM tblOtherForms
WHERE [Completed] Between Forms!PersonnelFormQueries!StartQueryDate
And
Forms!PersonnelFormQueries!EndQueryDate
GROUP BY tblOtherForms.[Form Type];
Quantity.
I want it to list them by the highest Quantity on down from both tables, and
am not sure where to stick the DESC.
Thanks.
SELECT PersonnelForms2009.[Form Type],
Count(PersonnelForms2009.[Form Type]) AS QTY
FROM PersonnelForms2009
WHERE [Completed] Between Forms!PersonnelFormQueries!StartQueryDate
And
Forms!PersonnelFormQueries!EndQueryDate
GROUP BY PersonnelForms2009.[Form Type]
UNION ALL SELECT tblOtherForms.[Form Type], Sum(Qty)
FROM tblOtherForms
WHERE [Completed] Between Forms!PersonnelFormQueries!StartQueryDate
And
Forms!PersonnelFormQueries!EndQueryDate
GROUP BY tblOtherForms.[Form Type];