I have a problem in my correlated subquery in ms access. Here is my query :
SELECT t1.MfgProductId, (SELECT Sum(BalanceQuantity) FROM qry_MfgShipmentDetailWIP AS t2 WHERE t2.MfgProductId = t1.MfgProductId) AS PrevQty FROM qry_MfgShipmentDetailWIP AS t1;
But when i run this i get error : invalid argument to a function. But when i run like this :
SELECT t1.MfgProductId, (SELECT Sum(BalanceQuantity) FROM qry_MfgShipmentDetailWIP AS t2 WHERE t2.MfgProductId = 'CFC1C06') AS PrevQty
FROM qry_MfgShipmentDetailWIP AS t1;
It runs fine.
Please help what causes the error?
