Results 1 to 4 of 4

Using a subform inside a form to show different frms from buttons

  1. #1
    Freddie81 is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    Mar 2018
    Posts
    149

    Using a subform inside a form to show different frms from buttons

    Click image for larger version. 
<br /><script async src=
    Name: reporting.JPG  Views: 11  Size: 46.1 KB  ID: 34674" class="thumbnail" style="float:CONFIG" />


    Hi again Guys.

    I have created a navigation form to house the rest o the forms. on the Reporting form I have a subform fied as you can see in the image above called DS. What I want to do is to update the subform field with the new form relating to the button the user presses. For example if I click VAT the field should update and show the form for VAT and so on.

    I have no idea how to acomplish this using vba.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    20,792
    You can set the SourceObject property of the subform control to the name of the desired form.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Freddie81 is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    Mar 2018
    Posts
    149
    Will I then be ble to click each button to load a differet form in it?

    How would I chang the object surce in vba?

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    20,792
    If the code is in the form containing the subform control:

    Me.SubformControlName.SourceObject = "FormName"
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Help/Advice for a subform inside a form
    By balderman in forum Access
    Replies: 3
    Last Post: 12-01-2017, 03:59 PM
  2. Opening Form To a Record Inside a Target SubForm
    By RichardAnderson in forum Forms
    Replies: 5
    Last Post: 04-18-2014, 05:19 PM
  3. Replies: 1
    Last Post: 02-03-2014, 03:06 PM
  4. Replies: 1
    Last Post: 08-11-2011, 06:22 AM
  5. Replies: 1
    Last Post: 08-03-2009, 08:24 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
  •  
Tech Forums: Microsoft Office Forums