Multiple Filter

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Lou699
    New Member
    • Nov 2020
    • 11

    Multiple Filter

    Hey Guys,

    I've created a query with employees vacations with the following columns:
    1) EmpID
    2) Name
    3) Business Area
    4) leave Date
    And then created a form that displays all vacations taken

    And then in the form I created text boxes above each with the following names:

    1) ID Filter
    2) BArea Filter

    What I want is to filter the form if an employee taken more than the number written in ID Filter box and when I chose a Business Area in BArea Filter Box it filters by both parameters

    e.g. If I write 3 in the ID Filter I want the form to show the employees that have taken 3 or more days off
  • isladogs
    Recognized Expert Moderator Contributor
    • Jul 2007
    • 483

    #2
    See my answer to a similar question in this Bytes thread https://bytes.com/topic/access/answe...hin-date-range

    Comment

    • Lou699
      New Member
      • Nov 2020
      • 11

      #3
      Sadly I couldn't find the part for the Afterupdate filter related to ID Filter

      What I want is whenever I write a number it shows the employees that are repeated for that number or more

      Comment

      • isladogs
        Recognized Expert Moderator Contributor
        • Jul 2007
        • 483

        #4
        Surely ID will be an autonumber primary key field so you will not / cannot update it.

        Presumably you are referring to selecting an ID field for filtering using a combo box or textbox

        Anyway, the principle is the same as in the example apps in my link.
        If you study that carefully, you should be able to adapt it for your purposes.

        Comment

        • Lou699
          New Member
          • Nov 2020
          • 11

          #5
          The ID is a short text and I don't want to filter based on a certain ID
          I want to filter based on the x number repeated so if I type 2 in the ID filter I want the form to filter for all the employees with 2 entries

          And when visited the topic you've sent I couldn't find a related solution

          Thanks

          Comment

          • twinnyfo
            Recognized Expert Moderator Specialist
            • Nov 2011
            • 3665

            #6
            You would have to use an aggregate query to determine how many entries each employee has, and then go from there. You would join the aggregate query with the employees table.

            Comment

            • isladogs
              Recognized Expert Moderator Contributor
              • Jul 2007
              • 483

              #7
              See almost identical thread by the same OP here: https://bytes.com/topic/access/answe...-ids-using-vba

              Comment

              Working...