Results 1 to 3 of 3
  1. #1
    alexandervj is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    145

    How can I pass a value from one form to another...

    So I have 2 forms, an Edit Lot Form, and an Add Run Form. Each lot will contain several runs. What I want to do is be able to add a run associated with the specific lot by pressing a button "Add Run" in the lower right corner of the edit lot form (see attached images). So the information for the lot will carry over to the run form and autofill the fields pertaining to the Lot in that form. How can I do this? Thanks!



    Click image for larger version. 

Name:	editLot1.jpg 
Views:	10 
Size:	154.1 KB 
ID:	14528 Click image for larger version. 

Name:	Addrun1.jpg 
Views:	10 
Size:	149.8 KB 
ID:	14529

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,630
    Something like:

    DoCmd.OpenForm "Add_Run_frm", , , , acFormAdd, , Me.LotSKU

    Then code in the Current event of Run form:

    If Me.NewRecord Then
    Me.LotSKU = Me.OpenArgs
    End If
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    alexandervj is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    145
    Thanks June! Just realized I could probably just do it with the where clause in macro editor also ie.
    OPEN FORM
    WHERE PartID = PartID... its been a long day,.. starting to ask stupid questions hahaha

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

Similar Threads

  1. Replies: 8
    Last Post: 05-10-2012, 10:57 AM
  2. pass value from one form to another
    By ManC in forum Forms
    Replies: 7
    Last Post: 11-25-2011, 09:59 AM
  3. Replies: 4
    Last Post: 04-22-2011, 03:08 PM
  4. Pass Value to Form
    By JohnBoy in forum Programming
    Replies: 5
    Last Post: 06-06-2010, 11:26 AM
  5. Pass a value from a form to another
    By cwwaicw311 in forum Forms
    Replies: 3
    Last Post: 03-16-2010, 12:42 AM

Tags for this Thread

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