Results 1 to 3 of 3
  1. #1
    JayX is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    62

    Button Command

    I have been creating an inventory control system for my small business. I am looking for a code that will generate to another form. So for example if I take out 4 aprons from the first row by hitting the '-1' button 4 times leaving 46 in total how do I generate the information from one form to another by hitting that submit button.

    My other form shows Product ID, Date Taken, Product Description, Employee who has taken it, Amount Taken, and Total left in inventory. I need the correct information to show accordingly in the Inventory control form. Is there a code that does this? Help would be greatly appreciated...

    I am attaching screen shots so you can get a visual look at what I am looking at.

  2. #2
    JayX is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2011
    Posts
    62
    the total amount of the aprons before hitting the '-1' button was 50.

  3. #3
    DanB is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Dec 2011
    Posts
    5
    You can try by first declaring a temporary variable "ProdTotal" when you open your application

    Code:
    TempVars.Add "tv_ProdTotal", "0"
    Then, when you click on either the '+1' or '-1' buttons, increment or decrement tv_ProdTotal as needed.

    cmd_Plus_1:
    Code:
    TempVars!tv_ProdTotal.Value = TempVars!tv_ProdTotal.Value + 1


    cmd_Minus_1:
    Code:
    TempVars!tv_ProdTotal.Value = TempVars!tv_ProdTotal.Value - 1

    When you click on Submit you Open the second form and simply copy the value of tv_ProdTotal to your 'Amount Taken' textbox then clear the value of the temporary variable:

    Code:
    tbx_AmountTaken.value = TempVars!tv_ProdTotal.value
    TempVars!tv_ProdTotal.Value = 0

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

Similar Threads

  1. Command Button
    By BLD21 in forum Access
    Replies: 2
    Last Post: 05-02-2011, 04:47 PM
  2. Replies: 1
    Last Post: 07-27-2010, 02:27 PM
  3. Command Button
    By nashr1928 in forum Forms
    Replies: 2
    Last Post: 07-05-2010, 08:02 PM
  4. Command Button
    By nashr1928 in forum Forms
    Replies: 1
    Last Post: 07-05-2010, 07:05 PM
  5. Command Button Help!
    By arthura in forum Programming
    Replies: 3
    Last Post: 06-30-2009, 12:55 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