Hi all,
I have a table called tblPackingMaterials and a table called tblMaterialQuantities
TblPackingMaterial has a number field called StartingQTY
tblMaterialQuantities has:
IDMaterial (a one to one relationship with MaterialID in tblPackingMaterial)
AdjustmentQTY
QTYinShop
From these 2 tables I have a select query with:
IDMaterial.tblMaterialQuantities
StartingQTY.tblPackingMaterial
AdjustmentQTY.tblMaterialQuantities
QTYinShop.tblMaterialQuantities (this field is calulated in the query using the expression QTYinShop: [StartingQTY]-[AdjustmentQTY]
The expression works perfectly only problem is I cannot seem to figure out how to update the StartingQTY with the QTYinShop after an adjustment is made so whenever I make an adjustment it is from the origonal StartingQTY.
I created a form from this and created an on click event in the StartingQTY field to update StartingQTY with QTYinShop when I click in the StartingQTY box. This works perfectly as well and I was able to deplete inventory levels.
I tried doing after update events in both (not at the same time) AdjustmentQTY and QTYinShop to update StartingQTY with QTYinshop but they do not work like the on click event in StartingQTY.
Is there a better code I can write to update StartingQTY with the QTYinShop after I make adjustment without having to click in the StartingQTY box? I do not want StartingQTY to be visible in the adjusting form because I dont want any numbers to get put in there.
Please help!! All answers are greatly appreciated!
I have a table called tblPackingMaterials and a table called tblMaterialQuantities
TblPackingMaterial has a number field called StartingQTY
tblMaterialQuantities has:
IDMaterial (a one to one relationship with MaterialID in tblPackingMaterial)
AdjustmentQTY
QTYinShop
From these 2 tables I have a select query with:
IDMaterial.tblMaterialQuantities
StartingQTY.tblPackingMaterial
AdjustmentQTY.tblMaterialQuantities
QTYinShop.tblMaterialQuantities (this field is calulated in the query using the expression QTYinShop: [StartingQTY]-[AdjustmentQTY]
The expression works perfectly only problem is I cannot seem to figure out how to update the StartingQTY with the QTYinShop after an adjustment is made so whenever I make an adjustment it is from the origonal StartingQTY.
I created a form from this and created an on click event in the StartingQTY field to update StartingQTY with QTYinShop when I click in the StartingQTY box. This works perfectly as well and I was able to deplete inventory levels.
I tried doing after update events in both (not at the same time) AdjustmentQTY and QTYinShop to update StartingQTY with QTYinshop but they do not work like the on click event in StartingQTY.
Is there a better code I can write to update StartingQTY with the QTYinShop after I make adjustment without having to click in the StartingQTY box? I do not want StartingQTY to be visible in the adjusting form because I dont want any numbers to get put in there.
Please help!! All answers are greatly appreciated!