Results 1 to 9 of 9
  1. #1
    WCStarks is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2016
    Posts
    314

    How to select from multiple subforms from within a master form

    Using Access 2016



    I have a master table
    Members (Contains all the personal information about each member in the organization)

    I have several child tables linked to the Members table, based on primary keys, using forced integrity.
    Activities (contains activities participated in by members for the organization)
    Transactions
    (contains transactions between the member and the organization)
    Committees
    (contains committees participated in by the members)
    Organization
    (contains positions held by members in the organization)

    I plan to have a subform for each of the child tables. I know how to create a master form, which includes an embedded subform. Doing this, however, I would have to create duplicate master forms (all with the same information), one for each embedded subform. I am sure MS has thought of how to avoid that.

    What I want to do, is create only one master Members form, from which I can select, one at a time, a subform from this set of subforms, to work with. And, once the subform has been selected, I want it to update as I browse from one Members record to the next in the master form.

    I cannot figure out how to do this, even after extensive searching on the Internet.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,921
    Not sure what the issue is. A 'master' form can have many subforms placed on it. Can organize them on pages of Tab control.
    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
    WCStarks is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2016
    Posts
    314

    Access db

    Here is my db. I originally started out to just keep track of transactions. Now we are interested in having me track the other aspects of the organization. Currently, I have two master forms: Members Trans and Members Acts. I really just want one Members form with multiple subforms for each of the other child tables.

    I didn't mention the Events table previously. As you can see from the Relationships screen, it is linked as a parent to only one child table, the Activities. The Activities table provides a cross-link between the Members and the Events table. From the event perspective, the activities subform would add names to each activity row, retrieved from the Members table. The Activity subform from the Members perspective, would not add the member names to each activity row. Since there will only be one subform for the eventual Events parent form, it is not an issue, as I already know how create the form and embedded subform for the Events table.
    Attached Files Attached Files

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,921
    Doesn't alter my suggestion.

    One Master form, one Tab control, multiple subforms.
    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
    WCStarks is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2016
    Posts
    314
    Quote Originally Posted by June7 View Post
    Doesn't alter my suggestion.

    One Master form, one Tab control, multiple subforms.
    I wasn't challenging your suggestion. I simply do not know how to do what you suggest.

  6. #6
    WCStarks is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2016
    Posts
    314
    OK. I found out how to create a tab control. I have named 4 tabs. I only have subforms for the 1st two tabs, at this time. I dragged and dropped the Transactions and Activities subforms into their respective pages. This looks just like what I want, but there is just one problem. When I click on a tab, it initially shows the subform in the selected page, but then it immediately opens the subform in the full db window, in single form mode, on a level with the Members tab, obscuring the Member form and related subforms. What am I missing to get it to work properly? Please see attachment.

    Scateam - Copy (2).zip

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,921
    You don't know what a Tab control is?

    Research Tab control. Can put subform container on each page of Tab control. Using a Tab control does not alter how subform links to master form.

    http://www.jegsworks.com/Lessons/dat...tabcontrol.htm
    https://support.office.com/en-us/art...84183C9815#bm4
    https://www.youtube.com/watch?v=NboJDp02zcw

    or this approach using VBA
    http://accessjitsu.com/2015/10/04/ms...iple-subforms/
    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.

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,921
    Remove the embedded macro that opens form.

    If you want to open form to single record then that's exactly the behavior you will get with db set up for Tabbed Documents. I prefer Overlapping Windows.
    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.

  9. #9
    WCStarks is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2016
    Posts
    314
    Thank you. I had initially set an event on click for both tabs, but later realized that was a mistake. I thought I had gotten rid of them, but I guess not. It is working now. This is great. Thank you again.

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

Similar Threads

  1. Replies: 4
    Last Post: 05-15-2017, 04:53 AM
  2. Replies: 57
    Last Post: 04-02-2013, 12:01 PM
  3. Linking Subforms on Unbound Master Form?
    By 10 Gauge in forum Forms
    Replies: 8
    Last Post: 07-21-2011, 08:06 AM
  4. Replies: 22
    Last Post: 03-15-2011, 07:17 AM
  5. Replies: 0
    Last Post: 02-28-2011, 09:46 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