I am in the process of building a program and from two different forms I need to update quantities of the inventory (a different table then what is on the forms). From one form I will need to update (add) quantity ordered and quantity on Hand. From the other form I will need to subtract quantity used from Quantity on Hand.

My question is what is the best way to implement this. Since the user can save several different record changes at once how can I tell if the user changed either of those fields (QtyOrd & QtyRcvd, which are in a datagridview) on all the different records that they are updating? Another problem is that the number maybe changed so say they had entered that they ordered 5 and then had changed the ordered amount to 10 - now I need to update that amount again - basically minus the 5 originally ordered and then add in the new ordered amount. This could happen also for the Qty on Hand. Say the user receives 5 of the part and then needs to change the received amount to a different number. I need to subtract the original received amount from the Qty on Hand (in the Inventory Table) and then add in the new received amount.

I am kinda confused on the best way to keep this all straight so that the amounts don't get screwed up when the user is making changes to the Quantity Ordered and Quantity Received amounts.
Any help you can provide as to how people handle the updating of the quantity on hand to keep the inventory amount correct would be much appreciated.
Thanks,
Stacy