In my Inventory Database there is a list of Products. Each ProductID has transactions to reduce or add to inventory for that particular Product. One is UnitsReceived. And the other is UnitsUsed.
I would like to make the calculation to subtract the UnitsUsed from the UnitsReceived. But I want to SUM all of the UnitsReceived and UnitsUsed for each ProductID before subtracting (this would give me "Units on Hand"). This calculation is done on the Product Form right now but I would like to have "Units on Hand" in the Products List as well. (this is in Datasheet view)
The control source for Units on Hand on the form is "=Sum(nz([UnitsReceived])-nz([UnitsUsed]))". But when I try this in a query it sums ALL of the products so each item shows the same number which is in the thousands.
So is there a way to create a query that can calculate something like this?