Results 1 to 5 of 5
  1. #1
    Dave14867's Avatar
    Dave14867 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Nov 2016
    Location
    Upstate NY
    Posts
    376

    Post Need to get info from on table to another when new form loads

    Hello all,


    I am fairly new to all this and trying to create a database to assist me at work. I have 3 tables created, hopefully correctly,. When I have the "Instrument Info Form" open and click on the "Log Issue" Command button, the "Issue Log Form" opens to enter a new record. I want the "Instrument ID" that was active when the Command button was clicked to be carried over and populated and also the "Instrument_Serial_Num" from the "Instrument Info Form"

    I have attached the file so you can take a look at it.

    Please be kind, I am new at this and trying to learn.

    Thanks

    DaveWet Run History - 3.zip

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2013
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    You use the wizard to create a subform on the form called "Instrument Info Form". The subform control would use your existing form "Issue Log Form". the "Instrument ID" fields would be populated automatically, maintaining your one to many relationship. As you have this relationship between the tables there should be no need to repeat data in the second table.

    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    Dave14867's Avatar
    Dave14867 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Nov 2016
    Location
    Upstate NY
    Posts
    376
    Bob,
    I want to keep the 3 separate form for now. I have tried DLOOKUP but I can't seem to get that to work for some reason. Can you help me out using that method?

    Thanks
    Dave

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2013
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    You could open the form using:
    Code:
    DoCmd.OpenForm "Issue Log Form", , , , , , Me.Instrument_ID
    This would pass the Instrument_ID value to the forms OpenArgs property which could then be referenced by the second form
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  5. #5
    Dave14867's Avatar
    Dave14867 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Nov 2016
    Location
    Upstate NY
    Posts
    376
    I will try that,

    Thanks

    Dave

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

Similar Threads

  1. Form loads with no current record
    By ts_hunter in forum Forms
    Replies: 11
    Last Post: 01-15-2014, 10:33 AM
  2. Form loads blank
    By sweetiepie in forum Forms
    Replies: 5
    Last Post: 06-07-2012, 02:34 PM
  3. Replies: 3
    Last Post: 01-31-2011, 11:47 AM
  4. Table loads too slowly
    By pcbrush in forum Access
    Replies: 8
    Last Post: 11-24-2010, 06:35 PM
  5. list box not updating until form loads
    By cowboy in forum Forms
    Replies: 3
    Last Post: 03-12-2010, 12:02 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