By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,256 Members | 1,663 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,256 IT Pros & Developers. It's quick & easy.

Help please! Add or remove from field value through a form

P: n/a
mkx
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!

Dec 6 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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!

Dec 7 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.