Results 1 to 11 of 11
  1. #1
    d9pierce1 is offline Expert
    Windows 10 Access 2019
    Join Date
    Jan 2012
    Location
    Oklahoma
    Posts
    754

    How on earth do I reference a sub form on a sub form?

    Profile.zip

    Hi all,
    How on earth do I reference a sub form on a sub form?
    I created a form (frmContactUs)
    Set its record source to tblBusinessEntity
    I placed sub form on it called sfrmBusinessEntity and sfrmBusinessAddress and then put that form in my primary form as a subform.
    I am trying to get the BusinessEntityID to be on the subform SfrmBusinessAddress


    Cannot get it to change once I select a different Business Entity Record? I set the Master / Child to BusinessEntityID
    But it has not recognized it so thinking its because its a subform on a sub form?
    In any event, Is there a way to link that ID field so that when I change entity, it changes the ID in the other subform?

    Reason being is a Business can have multiple entities, each entity can have multiple addresses
    Any ideas maybe? db attached, opens to Form in question!

    Thanks
    Dave

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,861
    Eaxctky the same as you would a subform on a mainform. There is a hierarchy.
    Key is the subfomcontrol name which is not always the same as the subform name.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  4. #4
    d9pierce1 is offline Expert
    Windows 10 Access 2019
    Join Date
    Jan 2012
    Location
    Oklahoma
    Posts
    754
    thank you Micron, that page is helpful and have added it to my arsenal!

  5. #5
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    You're welcome. Give it a shot then pat yourself on the back when you succeed!
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  6. #6
    d9pierce1 is offline Expert
    Windows 10 Access 2019
    Join Date
    Jan 2012
    Location
    Oklahoma
    Posts
    754
    Thanks Welshgasman,
    I guess I didnt explain myself enough and I may not even be able to do this. I am trying to access Form, Subform1 (sfrmBusiness as subform, frmContactUs as Source Object), Subform2 (SfrmBusinessEntity as Source Object)
    and Subform3 (sfrmBusinessAddress as another source object) linking subform 2 to 1, and then linking subform 3 to 2
    Not sure if even possible.

  7. #7
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Linking doesn't factor into referencing so leave that out of the explanation unless it becomes an issue. Nor is the source object important to know.
    State it as which subform control is a child of which. I cannot tell by your description if entity or address is supposed to be a parent/child thing or if both of them are children of business. In your attachment it is the latter, unless I'm looking at the wrong form.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  8. #8
    d9pierce1 is offline Expert
    Windows 10 Access 2019
    Join Date
    Jan 2012
    Location
    Oklahoma
    Posts
    754
    Hi all,
    Clarification?
    Can I link one subform to another subform on a primary form? Such as sfrmBusiness and sfrmBusinessEntity as Source Object, then link sfrmBusinessAddress to the subform sfrmBusinessEntity?

  9. #9
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    I think this is what you're asking about.
    https://www.fmsinc.com/microsoftacce...edSubforms.asp

    but then we've now gone from how to reference a subform to how to link 2 of them?

    Try looking for these solutions yourself more often as it will save time - yours and ours. There isn't much point in regurgitating information here that has been covered a gazillion times already. I'd say if you try and don't succeed, that's the time to ask for help. Same if you look and can't find it, and if you don't like that link try others. Of course, that's just my opinion and others may not agree.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  10. #10
    d9pierce1 is offline Expert
    Windows 10 Access 2019
    Join Date
    Jan 2012
    Location
    Oklahoma
    Posts
    754
    Thank you Micron,
    That was perfect and it worked like a charm! I will do better to search in future. Sometimes I am not sure what I am searching for though
    In any event, worked great and thanks
    Dave

  11. #11
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Nice to see you solved it!

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

Similar Threads

  1. Replies: 9
    Last Post: 04-23-2020, 02:09 PM
  2. Replies: 6
    Last Post: 08-16-2018, 08:07 AM
  3. Reference Form when using Navigation Form Access
    By pritesharyan in forum Access
    Replies: 3
    Last Post: 05-12-2015, 03:30 AM
  4. Replies: 3
    Last Post: 02-26-2015, 12:15 PM
  5. How to reference a form in the Navigation Form
    By HarryScofs in forum Access
    Replies: 3
    Last Post: 08-18-2011, 04:46 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