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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top