Results 1 to 4 of 4
  1. #1
    paologucci is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Mar 2016
    Posts
    5

    decrement value


    Hello, I have a product table with quantity for each product. I want to decrease the quantity according to the transaction. What is the simplest way to do that ?

  2. #2
    SuperAccessNinjas is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Mar 2016
    Posts
    8
    You'd need a separate table to capture the transactions. Then you could set up a couple queries, one select query to identify the most recent transaction (that hasn't been decrecemented yet) for each product, and an update query to execute the actual reduction in your inventory table.

    Feel free to email a zip version of the database to info@superaccessninjas.com for more specifics on the solution.

  3. #3
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,939
    to not do this at all, just sum the transactions. With a very few exceptions you should not store calculated values in a database - this is not one of those exceptions. With stock there will be a variety of transactions - stock in, stock out, stock adjustment, perhaps an opening balance if the stock pre exists the database

  4. #4
    paologucci is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Mar 2016
    Posts
    5
    Thank you guys for the reply. Superaccessninjas i sent the db

Please reply to this thread with any new information or opinions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums