Limit Sub Form records based on Main Form

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • BEETHOVEN

    Limit Sub Form records based on Main Form

    I have an option group called Issue_Type on my main form
    F1_Member_Demog raphics_Main. When I select one of the 3 options on the
    main form from the option group Issue_Type I want to limit the sub
    form F2_Member_Issue s records based on the combo box Issue_Code_T1.

    Option Group Issue_Type on main form:
    1=Complaint
    2=Grievance
    3=Appeal

    Combo Box on sub form:
    1=Complaint
    2=Grievance
    3=Appeal

    So if I select Complaint from the option group on the main form I only
    want to see Complaints on the sub form etc.

    Thanks in Advance
    Gary
  • Salad

    #2
    Re: Limit Sub Form records based on Main Form

    BEETHOVEN wrote:
    I have an option group called Issue_Type on my main form
    F1_Member_Demog raphics_Main. When I select one of the 3 options on the
    main form from the option group Issue_Type I want to limit the sub
    form F2_Member_Issue s records based on the combo box Issue_Code_T1.
    >
    Option Group Issue_Type on main form:
    1=Complaint
    2=Grievance
    3=Appeal
    >
    Combo Box on sub form:
    1=Complaint
    2=Grievance
    3=Appeal
    >
    So if I select Complaint from the option group on the main form I only
    want to see Complaints on the sub form etc.
    >
    Thanks in Advance
    Gary
    Forms!MainFormN ame!SubFormName .Form.Filter = _
    "Issue_Type = " & Me.Issue_Type
    Forms!MainFormN ame!SubFormName .Form.Filter = True

    Comment

    • Salad

      #3
      Re: Limit Sub Form records based on Main Form

      Salad wrote:
      BEETHOVEN wrote:
      >
      >I have an option group called Issue_Type on my main form
      >F1_Member_Demo graphics_Main. When I select one of the 3 options on the
      >main form from the option group Issue_Type I want to limit the sub
      >form F2_Member_Issue s records based on the combo box Issue_Code_T1.
      >>
      >Option Group Issue_Type on main form:
      >1=Complaint
      >2=Grievance
      >3=Appeal
      >>
      >Combo Box on sub form:
      >1=Complaint
      >2=Grievance
      >3=Appeal
      >>
      >So if I select Complaint from the option group on the main form I only
      >want to see Complaints on the sub form etc.
      >>
      >Thanks in Advance
      >Gary
      >
      >
      Forms!MainFormN ame!SubFormName .Form.Filter = _
      "Issue_Type = " & Me.Issue_Type
      Forms!MainFormN ame!SubFormName .Form.Filter = True
      Oh yeah, I forgot. Put that in your AfterUpdate event of the
      OptionGroup frame name and be sure the names reflect the names of the
      forms and controls you use.

      Comment

      • tina

        #4
        Re: Limit Sub Form records based on Main Form

        open the main form in Design view and click once on the subform to select
        it. in the Properties box, add the control name Issue_Type to the
        LinkMasterField s property, and add the name of the issue type field (from
        the subform's RecordSource) to the LinkChildFields property.

        hth


        "BEETHOVEN" <gromitz@sbcglo bal.netwrote in message
        news:7f61f264-152f-4cc9-a788-7c66c53d73c6@p2 5g2000hsf.googl egroups.com...
        I have an option group called Issue_Type on my main form
        F1_Member_Demog raphics_Main. When I select one of the 3 options on the
        main form from the option group Issue_Type I want to limit the sub
        form F2_Member_Issue s records based on the combo box Issue_Code_T1.
        >
        Option Group Issue_Type on main form:
        1=Complaint
        2=Grievance
        3=Appeal
        >
        Combo Box on sub form:
        1=Complaint
        2=Grievance
        3=Appeal
        >
        So if I select Complaint from the option group on the main form I only
        want to see Complaints on the sub form etc.
        >
        Thanks in Advance
        Gary

        Comment

        • BEETHOVEN

          #5
          Re: Limit Sub Form records based on Main Form

          On Sep 25, 4:39 pm, Salad <o...@vinegar.c omwrote:
          BEETHOVEN wrote:
          I have an option group called Issue_Type on my main form
          F1_Member_Demog raphics_Main. When I select one of the 3 options on the
          main form from the option group Issue_Type I want to limit the sub
          form F2_Member_Issue s records based on the combo box Issue_Code_T1.
          >
          Option Group Issue_Type on main form:
          1=Complaint
          2=Grievance
          3=Appeal
          >
          Combo Box on sub form:
          1=Complaint
          2=Grievance
          3=Appeal
          >
          So if I select Complaint from the option group on the main form I only
          want to see Complaints on the sub form etc.
          >
          Thanks in Advance
          Gary
          >
          Forms!MainFormN ame!SubFormName .Form.Filter = _
                  "Issue_Type = " & Me.Issue_Type
          Forms!MainFormN ame!SubFormName .Form.Filter = True- Hide quoted text -
          >
          - Show quoted text -
          Hello Salad

          Below are the 2 options I tried:
          Forms!F1_Member _Demographics_M ain!F2_Member_I ssues.Form.Filt er =
          "Issue_Type = " & Me.Issue_Type
          Forms!F1_Member _Demographics_M ain!F2_Member_I ssues.Form.Filt er = True
          or
          Forms!F1_Member _Demographics_M ain!F2_Member_I ssues.Form.Filt er =
          "Issue_Code _T1 = " & Me.Issue_Type
          Forms!F1_Member _Demographics_M ain!F2_Member_I ssues.Form.Filt er = True

          Neither one does anything to the form. It still shows all records. The
          option group (Issue_Type) data is not stored in any table but the
          combo box (Issue_Code_T1) data is. Can you see what I am doing wrong?

          Thanks
          Gary

          Comment

          • Salad

            #6
            Re: Limit Sub Form records based on Main Form

            BEETHOVEN wrote:
            On Sep 25, 4:39 pm, Salad <o...@vinegar.c omwrote:
            >
            >>BEETHOVEN wrote:
            >>
            >>>I have an option group called Issue_Type on my main form
            >>>F1_Member_De mographics_Main . When I select one of the 3 options on the
            >>>main form from the option group Issue_Type I want to limit the sub
            >>>form F2_Member_Issue s records based on the combo box Issue_Code_T1.
            >>
            >>>Option Group Issue_Type on main form:
            >>>1=Complain t
            >>>2=Grievanc e
            >>>3=Appeal
            >>
            >>>Combo Box on sub form:
            >>>1=Complain t
            >>>2=Grievanc e
            >>>3=Appeal
            >>
            >>>So if I select Complaint from the option group on the main form I only
            >>>want to see Complaints on the sub form etc.
            >>
            >>>Thanks in Advance
            >>>Gary
            >>
            >>Forms!MainFor mName!SubFormNa me.Form.Filter = _
            > "Issue_Type = " & Me.Issue_Type
            >>Forms!MainFor mName!SubFormNa me.Form.Filter = True- Hide quoted text -
            >>
            >>- Show quoted text -
            >
            >
            Hello Salad
            >
            Below are the 2 options I tried:
            Forms!F1_Member _Demographics_M ain!F2_Member_I ssues.Form.Filt er =
            "Issue_Type = " & Me.Issue_Type
            Forms!F1_Member _Demographics_M ain!F2_Member_I ssues.Form.Filt er = True
            or
            Forms!F1_Member _Demographics_M ain!F2_Member_I ssues.Form.Filt er =
            "Issue_Code _T1 = " & Me.Issue_Type
            Forms!F1_Member _Demographics_M ain!F2_Member_I ssues.Form.Filt er = True
            >
            Neither one does anything to the form. It still shows all records. The
            option group (Issue_Type) data is not stored in any table but the
            combo box (Issue_Code_T1) data is. Can you see what I am doing wrong?
            >
            Thanks
            Gary
            The field name is Issue_Code_T1. Is that correct?
            The option group is called Issue_Type. Is that correct?

            If both are true then the second set should work. The question
            is...where'd you put the code? Do you have it in the AfterUpdate event
            of the option group Issue_Code_T1? Also, your references should be the
            values in the Name of the field object (Other tab).

            Comment

            • BEETHOVEN

              #7
              Re: Limit Sub Form records based on Main Form

              On Sep 26, 2:36 pm, Salad <o...@vinegar.c omwrote:
              BEETHOVEN wrote:
              On Sep 25, 4:39 pm, Salad <o...@vinegar.c omwrote:
              >
              >BEETHOVEN wrote:
              >
              >>I have an option group called Issue_Type on my main form
              >>F1_Member_Dem ographics_Main. When I select one of the 3 options on the
              >>main form from the option group Issue_Type I want to limit the sub
              >>form F2_Member_Issue s records based on the combo box Issue_Code_T1.
              >
              >>Option Group Issue_Type on main form:
              >>1=Complaint
              >>2=Grievance
              >>3=Appeal
              >
              >>Combo Box on sub form:
              >>1=Complaint
              >>2=Grievance
              >>3=Appeal
              >
              >>So if I select Complaint from the option group on the main form I only
              >>want to see Complaints on the sub form etc.
              >
              >>Thanks in Advance
              >>Gary
              >
              >Forms!MainForm Name!SubFormNam e.Form.Filter = _
                     "Issue_Type = " & Me.Issue_Type
              >Forms!MainForm Name!SubFormNam e.Form.Filter = True- Hide quoted text -
              >
              >- Show quoted text -
              >
              Hello Salad
              >
              Below are the 2 options I tried:
              Forms!F1_Member _Demographics_M ain!F2_Member_I ssues.Form.Filt er =
              "Issue_Type = " & Me.Issue_Type
              Forms!F1_Member _Demographics_M ain!F2_Member_I ssues.Form.Filt er = True
              or
              Forms!F1_Member _Demographics_M ain!F2_Member_I ssues.Form.Filt er =
              "Issue_Code _T1 = " & Me.Issue_Type
              Forms!F1_Member _Demographics_M ain!F2_Member_I ssues.Form.Filt er = True
              >
              Neither one does anything to the form. It still shows all records. The
              option group (Issue_Type) data is not stored in any table but the
              combo box (Issue_Code_T1) data is. Can you see what I am doing wrong?
              >
              Thanks
              Gary
              >
              The field name is Issue_Code_T1.  Is that correct?
              The option group is called Issue_Type.  Is that correct?
              >
              If both are true then the second set should work.  The question
              is...where'd you put the code?  Do you have it in the AfterUpdate event
              of the option group Issue_Code_T1?  Also, your references should be the
              values in the Name of the field object (Other tab).- Hide quoted text -
              >
              - Show quoted text -
              I am getting lost on where to put the code. I put the code in the
              Option Group-Issue_Type on after update on the main form-
              F1_Member_Demog raphics_Main. I am not sure what you mean by "Also,
              your references should be the values in the Name of the field object
              (Other tab)."

              Thanks
              Gary

              Comment

              Working...