change a record in table from a form vb code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i want to update in a table the qty from a form. i used
[Forms]![frmsold]![frmsold subform]![qty] = [Forms]![frmsold]![frmsold
subform]![qty] - [Forms]![frmsold]![minusQty]
but then i tryed
![tblchina]![qty] =
![tblchina]![qty] -
[Forms]![frmorders]![frmordertransactions subform]![qty]
i just cant find the syntex for using tables.
 
You cannot directly address tables in VBA. You can either create an Update
query and run it from VBA or you can open the table as a recordset and update
it. The easier way would be to write an update query, probably.

In eiter case, you will have to identify which record in the table to update.
 
Back
Top