Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Feb 2002
    Posts
    74
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Resetting parameter filter (A2K)

    I have a button that applies a parameter query (filter) with DoCmd.ApplyFilter "q2GetOneIncidentIDRecord" . Another button, with "Me.FilterOn = False" turns the filter off.

    When I press the filter button I am prompted for an Incident ID. The query (filter) does work. Pressing the second button does remove the filter. However, pressing the first button does not invoke the parameter pop up again, but rather just shows the originally filtered record.

    What is the proper way to apply, remove, and then reapply a filter with a parameter?

    Thanks,

    Randy

  2. #2
    Star Lounger
    Join Date
    Feb 2002
    Posts
    74
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Resetting parameter filter (A2K)

    In my post, above, I said "Another button, with "Me.FilterOn = False" turns the filter off." I changed that to "DoCmd.ShowAllRecords" with the same result. Then I changed it to:
    DoCmd.ShowAllRecords
    DoCmd.ShowAllRecords
    ... and it works fine. That still doesn't answer my question. And why should I have to enter this command twice to make it work?

    Thanks

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Resetting parameter filter (A2K)

    Me.Filter = ""
    Charlotte

Posting Permissions

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