Results 1 to 5 of 5
  1. #1
    jedder is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2012
    Posts
    7

    populate empty subform on open from form button with linked ID

    Have a command button on form opening a subform


    when subform opens it will be empty of data
    I need to populate the ID field in the subform(which is the linked field) with the ID field data from the form that has opened it.
    I'm thinking it's an OpenArg in the open event of the subform, but, unsure of how to code this.
    Any help, much appreciated.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    A subform is a form that is on another form. Don't need a command button to open subform. It is open when the main form opens. Set Master/Child links properties of the subform container control. The related ID will automatically save when data entered into subform.

    If this is actually an independent form then I suggest you explore form/subform arrangement.
    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
    jedder is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2012
    Posts
    7

    Opening a subform

    Quote Originally Posted by June7 View Post
    A subform is a form that is on another form. Don't need a command button to open subform. It is open when the main form opens. Set Master/Child links properties of the subform container control. The related ID will automatically save when data entered into subform.

    If this is actually an independent form then I suggest you explore form/subform arrangement.

    I created it as a subform so I can link the ID fields as it will show on a main page when data is entered.
    I need people to be able to open it only if needed to enter additional data into memo fields.
    Since the ID is not populated yet til data is entered, the ID will not show. I don't want to have it manually entered.
    Whatever version(be it form, sub, datasheet, etc.) I create of this, I need the ID field automatically populated on open.
    Thanks for the response.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    What do you mean by 'additional data into memo fields'? Are you adding data to an existing record? Do you want to provide project for analysis?
    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.

  5. #5
    jedder is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2012
    Posts
    7
    Quote Originally Posted by June7 View Post
    What do you mean by 'additional data into memo fields'? Are you adding data to an existing record? Do you want to provide project for analysis?

    On the main form, they are entering description and notes re:subject.
    I want to be able for them to open up another form to add any additional descriptions/notes for that field.
    That's why I want the form closed and only able to open from a button.
    maybe I need to use a different way to enter this, I'm not sure.
    The idea seems workable. The form is opening how I need it to...just not showing the ID on open.
    Someone else mentioned it will populate after data entry and close.
    Haven't tried yet. Will work on this tomorrow.
    Thanks for input!

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

Similar Threads

  1. Command button to populate subform
    By akhlaq768 in forum Forms
    Replies: 2
    Last Post: 02-07-2012, 04:57 AM
  2. Subform empty when main form loaded
    By martyjward in forum Forms
    Replies: 1
    Last Post: 08-15-2011, 04:37 AM
  3. Replies: 3
    Last Post: 12-06-2010, 06:35 PM
  4. Populate or Empty Form
    By gazzieh in forum Forms
    Replies: 0
    Last Post: 12-02-2009, 05:56 AM
  5. Open a linked subform with a command button
    By flablueeyedblond in forum Forms
    Replies: 0
    Last Post: 11-18-2005, 01:18 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