Results 1 to 6 of 6
  1. #1
    ITRAIN is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    3

    Update an OnHandQty table field based on the Qty field from another table/form.

    I have a table called Inventory (table1 - PK=INVID) that contains all inventory ID numbers and descriptions. I have another table called Inventory Transactions (table2 - FK=INVID) that gets updated through a form. When a new transaction is made in table2, I want the transaction amount to get added or subtracted to an OnHandQty field in table1. I tried having table2 (transaction table) as the main form and then table2 as the subform, but I couldn't get table2 to update. Any help would be appreciated.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Personally I wouldn't try to save it. There's a discussion of the topic here, including what needs to be done at the bottom:

    http://allenbrowne.com/AppInventory.html

    If you have 2010, you can use data macros, but I probably still wouldn't save it.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    ITRAIN is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    3
    I really need to store an ONHAND quantity. I can pass the transaction quantity from the main form to the subform, but when I use a macro for the ONHAND quantity field calculation, it doesn't get updated to the table.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Yes, everybody always really needs to. Did you review the section at the bottom? I don't think a subform is the way to go. If you have 2010, data macros are the way to make sure you capture every transaction. This is not a trivial or simple task. Not having seen what you're trying, I can't speculate as to why it fails.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    ITRAIN is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    3
    I will try that. Thank you for your help.

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    No problem.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 5
    Last Post: 04-24-2012, 06:42 PM
  2. Replies: 1
    Last Post: 08-31-2011, 04:03 PM
  3. Replies: 4
    Last Post: 04-18-2011, 07:18 AM
  4. Replies: 3
    Last Post: 01-17-2011, 01:48 AM
  5. Replies: 4
    Last Post: 09-03-2009, 02:01 PM

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