Hi all,
I have the following query (Access 2010):
This produces the following result:
ProductID SumOfQuantSold SumOfQuantBought
widget1 (QS)2 (QB)100
widget2 (QS)20 (QB)400
widget3 (QS)5 (QB)100
sorry about the formatting, there does not appear to be a TAB so I have used (QS) for SumOfQuantSold and (QB) for SumOfQuantBought.
What I would like to do is to get it to produce a stock level for each item as in
[SumOfQuantBought] - [SumOfQuantSold] to display the current stock levels on a form.
How can I do this?
Regards
Bob (Access Novice)
I have the following query (Access 2010):
Code:
SELECT tblSales.ProductID, Sum(tblSales.QuantSold) AS SumOfQuantSold, Sum(tblSales.QuantBought) AS SumOfQuantBought
FROM tblSales
GROUP BY tblSales.ProductID;
ProductID SumOfQuantSold SumOfQuantBought
widget1 (QS)2 (QB)100
widget2 (QS)20 (QB)400
widget3 (QS)5 (QB)100
sorry about the formatting, there does not appear to be a TAB so I have used (QS) for SumOfQuantSold and (QB) for SumOfQuantBought.
What I would like to do is to get it to produce a stock level for each item as in
[SumOfQuantBought] - [SumOfQuantSold] to display the current stock levels on a form.
How can I do this?
Regards
Bob (Access Novice)