Hi =?Utf-8?B?SmVubmlmZXI=?=,
> I really stack with this very small project....I have a word document and
> its form from VBA...in the form there are one combobox called "Item Code" and
[quoted text clipped - 8 lines]
>
> I would very happy if you provide me a walktrough/codes for this....
This is really a question you should ask in an Access newsgroup. Basically,
though, you'd have two approaches.
1. Use DAO or ADO (whichever you're using to pull the data from the database
into the form). Set up a recordset containing just the selected record from
"Item Code". Set the value for the "QTY" field. Very roughly
intQty = rs.Fields("Qty").Value
intQty = intQty - txtQty.Value
rs.Fields("Qty").Value = intQty
2. Faster, but perhaps more complex for you to deal with, would be to run an
UPDATE query on the recordset.
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)