Results 1 to 7 of 7
  1. #1
    ETCallHome is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Mar 2011
    Location
    Limpopo, South Africa
    Posts
    48

    Unhappy Passing Data From One Form to Another Form

    Hi,

    I am the new kid on the block and calling home for help. I created a Master Table (Eg. ID/First Name/Last Name) and a Another Table (Eg. ID/First Name/Last Name) these fields are common to both tables. I created a form1 and enter the details for the Master Table, then created a command button to open Form2 that uses the data from the other table. I want to pass the common data from Form1 and populate the data on form2 without having to enter the information again...



    Please help....

  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,640
    After opening the second form:

    Forms!SecondFormName.IDField = Me.IDField

    You should know that generally you would only store the ID value in the second table, not the names.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    ETCallHome is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Mar 2011
    Location
    Limpopo, South Africa
    Posts
    48
    As mentioned... I am new at this... where on the second form do I enter the command you gave me... I really appreciate your speedy response

  4. #4
    timmy is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    62
    you can do this pretty easily i think. just right click the text box (in design view on the form), select Properties, click the Data tab, select "..." button next to control source and navigate to the field you want it to pull data from.

  5. #5
    ETCallHome is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Mar 2011
    Location
    Limpopo, South Africa
    Posts
    48
    Hi Timmy, thanks for your reply... I tried what you said and it does not bring the data across from Form1 to Form2. I even tried to enter the code in a Private Sub Form_Load and it still does not display...

    Any other help would be much appreciated...

    Thanks
    Earl

  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,640
    You can push it from the code in the first form that opens the second form or pull it from the second form. The code I posted would be pushing from the first form. The syntax is:

    DestinationPath = SourcePath
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    thhui is offline Competent Performer
    Windows XP Access 2002
    Join Date
    Feb 2009
    Posts
    235
    The logic seems to be:
    On 1st form, create a button and code it
    1) to open the 2nd form
    2) 2nd form field value=1st form field value

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

Similar Threads

  1. Passing value from one form to another
    By Molly152 in forum Forms
    Replies: 4
    Last Post: 11-16-2010, 11:03 AM
  2. Replies: 10
    Last Post: 09-27-2010, 08:06 PM
  3. Form not passing data to query
    By bobfin in forum Queries
    Replies: 13
    Last Post: 08-11-2010, 05:28 AM
  4. Passing current form name to other form
    By owiec in forum Forms
    Replies: 2
    Last Post: 11-15-2009, 05:50 AM
  5. Passing data to sequential form fields
    By jeepfamilyva in forum Forms
    Replies: 0
    Last Post: 06-28-2009, 11:04 AM

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