Sum Quantity by Product

K

Kirk P.

I'm using a DSum function to provide total quantities by product id. The
function is providing the GRAND total of quantities, and not the quantities
by product id. Can anyone spot anything wrong?

SELECT GL_PROD_ID, Quantity,
DSum("Quantity","tblShipOrders_Detail_Crosstab","GL_PROD_ID = " &
'GL_PROD_ID') AS Ttl_Qty
FROM tblShipOrders_Detail_Crosstab
ORDER BY GL_PROD_ID;
 
A

Allen Browne

No need for the DSum():
SELECT GL_PROD_ID, Sum(Quantity) AS Ttl_Qty
FROM tblShipOrders_Detail_Crosstab
ORDER BY GL_PROD_ID;
 
Top