Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / December 2005

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mkx - 06 Dec 2005 17:18 GMT
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!
Allen Browne - 07 Dec 2005 15:51 GMT
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

Signature

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.

> 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
[quoted text clipped - 3 lines]
> form is closed.  it seems simple 25-5=20 but i tried using expression
> builder but couldn't make it work.  please help!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.