Hi to all!

I have a main form in ms access (OrderEntryForm) and a subform(OrderEntrySubform). These forms are similar to northwinds orders form.
My question is how do i update the quantity on hand field in the OrderEntrySubform after I inputted the payment in the txtAmount in the OrderEntryForm. The OrderEntrySubform is bound to a query (qryOrderDetails) similar to northwind's order details extended..
The code below illustrates when the cashier inputs payment in the txtAmount the and press enter, the change due is computed...

Here is the scenario....

Product Code: a-111
Name: Jergens
Stocks: 200
Quantity Ordered: 10

Product Code: a-112
Name: Graham Crackers
Stocks: 300
Quantity Ordered: 15

Product Code: a-113
Name: Cream-O
Stocks: 100
Quantity Ordered: 5




Total Due: 490
(txtAmount) --> Payment: 500
Change Due: 10.00

When the txtAmount_LostFocus() is called, the change due is computed and the stocks for Items Jergens, Graham Crackers, and Cream-O will be updated into 190, 285, and 95 respectively...Hope you got my point...

VB Code:
  1. ' Main form: OrderEntryForm textbox (txtAmount)
  2.  
  3.         Private Sub txtAmount_LostFocus()
  4.            'these four lines will compute for the change due
  5.            total = txtTotal.Value
  6.            amt_paid = txtAmount.Value
  7.            change = amt_paid - total
  8.            txtChange.Value = change
  9.        
  10.            'code for updating the quantity on hand
  11.            ???????????
  12.  
  13.         End Sub

If you can provide me with comprehensive tutorials on VBA for ms access, it would be a great help also...

Hoping for any response....