Results 1 to 4 of 4

Thread: Filtered Forms

  1. #1
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Northern, California, USA
    Posts
    1,886
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Filtered Forms

    Office 97 SR2.

    I have a command button that opens a form, filtered. What can I do in VBA to remove this filter? Ideally, When the user clicks on a search button, the filter would be removed. Any ideas?

    Thanks!
    <IMG SRC=http://www.wopr.com/w3tuserpics/Kel_sig.gif>
    Moderator:<font color=448800> Pix Place, Internet Explorer</font color=448800>
    <small>www.kvisions.com

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Filtered Forms

    How about: RunCommand acCmdRemoveFilterSort

    Never tried it myself, and I don't know if it just removes the Sort or the Filter & Sort.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Filtered Forms

    How about

    Private Sub Command11_Click()

    Me.Filter = ""

    End Sub

    John Graves

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

    Re: Filtered Forms

    It depends on where you applied the filter in the first place. If you applied the filter to the form, use the form's filter property and set it to an empty string ("") or set the form's FilterOn property to false. If you do the latter, you can reapply the existing filter if you want to by setting the FilterOn property to true.
    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
  •