Results 1 to 5 of 5
  1. #1
    sevanty7 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2013
    Posts
    37

    Question Bringing entered data from one textbox on a form to a textbx on another form

    Hello,


    I currently have two froms, "add record" and "add record cont."
    The reason I have two seperate forms is because when clients create a new record information needs to be saved to two different tables and when creating one from with fields from both tables I ran into many problems.
    The two tables are named : tblMain, tblFileLoc
    Currently there is a textbox on both forms named "fileID" the FileID in the first form is from tblMain and is the primary key for that table, the FileID on the second form "Add Record Cont." is just a normal field.
    When clients enter in the new FileID in the first form "Add Record" and then move onto the next form "Add Record Cont." i need access to bring the entered FileID from the first form and Fill it in the FileID field in the second form.
    Currently I have tried making the control source for the textbox on the second form = the textbox on the first form but it brought up an error.

    Thank you for any help

  2. #2
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    India
    Posts
    616
    Currently I have tried making the control source for the textbox on the second form = the textbox on the first form but it brought up an error.
    This will not work for a bound field.Instead, try it as default value.

  3. #3
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    Are both forms opened at the start of the process.
    When the add record form is opened does the add record cont form also open?

    It also sounds like your tables need to be normalized some if you are try to save the same data in 2 different tables.

    Dale

  4. #4
    sevanty7 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2013
    Posts
    37
    The way it currently is set up is that once the client has entered all the appropriate informationon the first "add Record`there is a save button that then opens the "add record cont." form. However it it would work more smoothly to open both at once that can be done

  5. #5
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    On the save button On Click event you can try,
    Code:
    DoCmd.OpenForm "add record cont", acNormal, , "FileID=" & FileID, acFormEdit, acWindowNormal
    Change FileID to whatever your record Id is for the recordset.

    Run the after your save command.


    Dale

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

Similar Threads

  1. Form not showing entered data
    By ashu.doc in forum Forms
    Replies: 8
    Last Post: 01-27-2013, 07:49 PM
  2. Replies: 1
    Last Post: 01-09-2013, 01:33 PM
  3. Replies: 2
    Last Post: 12-18-2012, 11:41 AM
  4. Replies: 13
    Last Post: 09-14-2011, 07:19 AM
  5. Bringing forward a data in a form
    By cwwaicw311 in forum Forms
    Replies: 9
    Last Post: 02-24-2010, 07:58 PM

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