Not able to connect Sub-Forms

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sg2808
    New Member
    • Mar 2012
    • 91

    #1

    Not able to connect Sub-Forms

    Hi,

    I have a main form and three subforms [Form A], [Form B] and [Form C].

    The underlying relationships of the tables are
    [Maintable] 1:M [Table A] 1:M [TableB]

    [Mainform], [Form A], [Form B] are based on the corresponding tables above.

    Form C is based on fields from the above tables.

    I created the main form, Form A and Form B using the Form Wizard and they are well connected.

    Here, [Form A] is connected to main form.
    Source object: Form A
    Link Master Field: JurID
    Link Child Field: JurID

    [Form B] is connected to [Form A]
    Source object: Form B
    Link Master Field: [Form A].Form![RulesMapID]
    Link Child field: RulesMapID

    I created a [Form C] separately and then placed this form on the above main form.
    I am trying to connect Form C to Form A.
    Source object: Form C
    Link Master field: [Form A].Form![RulesMapID]
    Link Child field: RulesMapID.

    When I scroll the records in the main form, the applicable records comes up nicely in all sub-forms.

    However, when I select a record in [Form A], [Form C] is not reflecting the applicable records.

    It is showing all the reocords and not the applicable records based on record selected in [Form A].

    I am wondering what do I have to do to link Form A and Form C so that I can see only the relevant records in Form C.

    Please advise.
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32669

    #2
    Originally posted by sg2808
    sg2808:
    I am wondering what do I have to do to link Form A and Form C so that I can see only the relevant records in Form C.
    [Form C] would have to be held in a subform of [Form A].

    Comment

    • sg2808
      New Member
      • Mar 2012
      • 91

      #3
      Sorry NeoPa, could not understand what is means "[Form C] would have to be held in a subform of [Form A]" - as [Forms A] and [Form B] are already in the main form. Extending this logic, I kept the [Form C] in the main form.

      Will try your suggestion again, if I am clear.

      Just to add, as [Form A] and [Form B] are linked, when I select a record in [Form A] then [Form B] shows the relevant records but this is not happening in [Form C]. Something to do with "re-query"?

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32669

        #4
        Originally posted by NeoPa
        NeoPa:
        [Form C] would have to be held in a subform of [Form A].
        [Form A] and [Form B] are in subform controls on the form [Main Form]. Straightforward enough so far. Both of these forms stay synchronised with their parent as they are in subforms. For [Form C] to stay synchronised with [Form A], it must be held in a subform of [Form A] - Not a subform of [Main Form]. Forms in subforms are automatically synchronised with their parents - not other forms held in other subforms on the parent.
        Last edited by NeoPa; Mar 30 '12, 04:39 PM. Reason: Added quote.

        Comment

        • sg2808
          New Member
          • Mar 2012
          • 91

          #5
          Fantastic. Understood and can see how it works.
          Many thanks for your clarification.

          Comment

          • NeoPa
            Recognized Expert Moderator MVP
            • Oct 2006
            • 32669

            #6
            Glad to help SG :-)

            Comment

            Working...