Hi guys. I am sure it is easy and someone allerwdy asked for it, but I just can't Google solution for it. I have a table and form where I registere usage of some chemicals. What I want is to update a quantity I have left in stock (another table) when registrering usage.
I was trying to use a VBA code to update it but it is just not working. Can you guys help me? I have put the code on a form ChemRegister in "events on update" of the form. And the code I was using was:
PRIVATE SUB Form_AfterUpdate()
Set [TblChemType]![ChemQuantity] = [TblChemType]![ChemQuantity] + [TblChemRegister]![ChemUsage]
End Sub
I was trying to use a VBA code to update it but it is just not working. Can you guys help me? I have put the code on a form ChemRegister in "events on update" of the form. And the code I was using was:
PRIVATE SUB Form_AfterUpdate()
Set [TblChemType]![ChemQuantity] = [TblChemType]![ChemQuantity] + [TblChemRegister]![ChemUsage]
End Sub