Consulting

Results 1 to 2 of 2

Thread: Solved: Filter records from command button

  1. #1
    Moderator VBAX Master austenr's Avatar
    Joined
    Sep 2004
    Location
    Maine
    Posts
    2,033
    Location

    Solved: Filter records from command button

    I have a report that is all subreports. On a form I have a combo box that has three fields; STU, FirstName and LastName. On the form I have a command button as well.

    What I am trying to figure out is how to open the sub reports and filter the records for the sub reports based on the conbo box selection. All of the sub reports use the STU as the join. So I was hoping to find a way that when the STU in the combo box is selected, show only those records in each sub report.

    The STU is hidden on the combo box so all you see is FirstName and LastName.

    Any ideas?
    Peace of mind is found in some of the strangest places.

  2. #2
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    Ideally you would have all 3 subreports based upon queries.
    You can then use the Criteria row of the queries' STU column to enter
    forms![formname]![comboname]
    where the formname is the name of your form and Comboname is the name of the STU combo.
    Alternatively you could use the main Report as a Header and just filter that for the STU and then Master/Child Link the subforms to it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •