While you could execute an UPDATE query statement, or OpenRecordset with
Edit and Update, there is no reliable way to do what you are asking. And
even if you could do it 100% perfectly, there is still no way to demonstrate
that the stored figure is correct.
After you have subtracted, the 5, what happens if the user realises, Oops,
that should have been 50? Or if they delete the record? Or change the
product to a different one?
This is actually quite a significant topic. For an introduction, see this
article:
Inventory Control - Quantity On Hand
at:
http://allenbrowne.com/AppInventory.html
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"mkx" <ma***@di-ve.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
i'm sure there's someone who has the solution from me out there. i
have a simple database and one of the fields in the table 'products' is
'stock'. now i need to add or reduce the value of the field 'stock'
through a form. i mean if the stock is 25, and the user enters 5 as
stock removed, the new 'stock' in the table should become 20 when the
form is closed. it seems simple 25-5=20 but i tried using expression
builder but couldn't make it work. please help!