Results 1 to 11 of 11
  1. #1
    PATRICKPBME is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    171

    Making sub form unique to client's "main" form

    I figured this out before, no doubt with the help from this forum, but can't remember how I did it. Very frustrating, but here is what I have and what I am trying to accomplish:



    I have a relatively simple database with one table and maybe 15 fields (name, address, etc) for about 200 clients. From the table I have created a form to quickly add/change info or add a new client. In a previous DB I also had a sub form linked by a button which had basic info from the table. The sub form had two columns; one for date and one for activity. In my previous DB I could click on the button and this sub form would open with the name, etc. of the client whose form I had opened. In the sub form I would then enter then date and any activity happening on that date (i.e. "1-1-19 John sent the agreement back to Tom"). Here is what I can't remember how to do:

    I can open the sub form and enter info. However, the same information is included when I open the sub form in any other client's record. At some point I discovered how to tell access to only enter/display info entered for each specific client on their sub form. For the life of me I can't figure out what I did.

    Any guidance is appreciated and thanks in advance!

  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,518
    Sounds like you're looking for the master/child link properties of the subform control (not the subform itself, the subform control on the main form).
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    PATRICKPBME is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    171
    Thanks, Paul. Could you elaborate or maybe point me in the right direction? Is this something I would go into in design view with the main or subform? I think I may have found some articles I will check and maybe a YouTube video

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    With the main form in design view, click once on the subform and view the properties, data tab. If you click twice you'll get the properties of the subform itself, which is not what you want. If you use the wizard to add a subform it should ask about linking fields. The master/child links is what it will populate.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    PATRICKPBME is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    171
    Thanks Paul. I am able to get the subform to link to the main form and it links the fields I need linked. My problem is when I enter any information on that subform it doesn't "stick" to that one client. Instead, the info for client #1 comes up for everyone else as well although the fields I have linked change appropriately.

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Can you attach the db here?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #8
    PATRICKPBME is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    171
    Thanks. I did know how to do this and the refreshed was very helpful. It did say one thing that confused me. It said that I could save the form as a stand alone but that it would contain all of the information on the subform, not just the information "relevant to the current record of its parent form." That makes perfect sense to me. What I am trying to accomplish is (1) not have a subform appearing on the main form and (2) having a button on the main form which opens the subform with only the information specific to the client in the main form. Looking again at Pbaldy's master/child link comments above.

  9. #9
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,389
    Attachment 40224
    Patrick see attached.
    Form/Subform arrangement with Teams/Players.
    The subform is initially invisible. Clicking button to 'Show Players' will display populated subform if Players exist.
    If no Players exist, msgbox will ask if you wish to add Players and if so, the empty subform is displayed.

  10. #10
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Quote Originally Posted by PATRICKPBME View Post
    (2) having a button on the main form which opens the subform with only the information specific to the client in the main form.
    That sounds like:

    http://www.baldyweb.com/wherecondition.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  11. #11
    PATRICKPBME is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    171
    All:

    Thanks for all of the help. The problem was my failure when linking to tell the tables what specific fields should be looked at. Got it working now and will post my latest problem separately ...

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

Similar Threads

  1. Replies: 7
    Last Post: 08-07-2017, 03:22 PM
  2. Replies: 2
    Last Post: 01-23-2017, 07:06 PM
  3. Replies: 1
    Last Post: 04-26-2016, 05:24 PM
  4. Replies: 1
    Last Post: 09-07-2015, 08:00 AM
  5. Making "Hot Keys" On FORM
    By taimysho0 in forum Programming
    Replies: 3
    Last Post: 06-12-2012, 05:14 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