khan wrote:
hey trevor, I am still confused, can you explain a bit please man. i do
update when i enter sold qty in saledetail table, and I do it on before
update event of the form but i dont know how to update when you delete
a record.
You don't. You get rid of the qtyOnHand field from your database. Never
store a total.
e.g. to get a sum of the Qty field in the detail...
If this is a textbox in header/footer of your subform, set it's
ControlSource to:
=Sum(Qty)
In the main form, it would be something like:
=DSum("Qty","tablename","FKfieldname=" & [PKFieldname])