Aidan,
I still think the SQL query must be able to do it, even in Access.
Having read a bit more carefully, I think your query is more complicated
than it need be.
You don't seem to need to bring the Purchase table into it, or to have the
Status in the GROUP BY.
How about something like this?
SELECT PI.Name, SUM(PI.Quantity) AS AmountSold
FROM PurchaseItem PI, PurchaseStatus PS
WHERE Whichever.ShopUID = '#Session.ShopUID#'
AND PS.Status = 2
GROUP BY PI.Name
ORDER BY SUM(PI.Quantity) DESC
Nick
**********************************************************************
Information in this email is confidential and may be privileged.
It is intended for the addressee only. If you have received it in error,
please notify the sender immediately and delete it from your system.
You should not otherwise copy it, retransmit it or use or disclose its
contents to anyone.
Thank you for your co-operation.
**********************************************************************
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.