In AC97, I'm trying to calculate the ending inventory on my report StackingTubeInventory, but it doesn't know the starting inventory. The form has a Record Source of qryInventoryStackingTube.
The query is:
I have a textbox for Ending Inventory with control source
that has Running Sum set to "Over Group"
It calculates the Ending Inventory for the "first" day by taking B1Belt-B2Belt+StackingTubeAdjustment. What I need is it to take the Ending Inventory of the previous day, and then add B1Belt-B2Belt+StackingTubeAdjustment, but it doesn't know the "Ending Inventory of the previous day".
How do I get the Ending Inventory of the previous day into the calculation?
Do I need a field in my tblBeltScales to store the Ending Inventory?
Note: In tblBeltScales there is not necessarily a record for each day, and there may be multiple records for each day.
Thanks,
Brian
The query is:
Code:
SELECT tblBeltScales.WeightDate, tblBeltScales.B1Belt, tblBeltScales.B2Belt, tblBeltScales.StackingTubeAdjustment
FROM tblBeltScales
WHERE (((Format(tblBeltScales.WeightDate,'mm/dd/yy'))>=[Forms]![frmStackingTubeInventoryReport]![tbxStartDate] And (Format(tblBeltScales.WeightDate,'mm/dd/yy'))<=[Forms]![frmStackingTubeInventoryReport]![tbxEndDate]));
I have a textbox for Ending Inventory with control source
Code:
=NZ([B1Belt],0)-NZ([B2Belt],0)+NZ([StackingTubeAdjustment],0)
that has Running Sum set to "Over Group"
It calculates the Ending Inventory for the "first" day by taking B1Belt-B2Belt+StackingTubeAdjustment. What I need is it to take the Ending Inventory of the previous day, and then add B1Belt-B2Belt+StackingTubeAdjustment, but it doesn't know the "Ending Inventory of the previous day".
How do I get the Ending Inventory of the previous day into the calculation?
Do I need a field in my tblBeltScales to store the Ending Inventory?
Note: In tblBeltScales there is not necessarily a record for each day, and there may be multiple records for each day.
Thanks,
Brian