Results 1 to 3 of 3
  1. #1
    MaggieN is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2015
    Posts
    7

    Remove Filter created by ApplyFilter macro on Form using a separate button on Form

    Hi all,



    In my form, I have a textbox and next to it a "Search" command button created with the "Apply Filter" macro:
    [ReportName.TextField] Like "*" & Forms![frmReportName]!Text18 & "*"

    ReportName... Table I'm searching from
    TextField.... specific field text in that table I type into the search textbox
    frmReportName.... form I have the textbox and "Search" command button on.

    I need to create another command button on the form, that would remove the filter, so I can start another Search in the text box. (I don't want the user to have to click the "Filter" on the bottom of the form or on the ribbon - I want a separate, visible, button for this).

    How do I do that? I don't understand VBA code. Is there an option to create a button and in the "On click" section in properties I'd just type another macro? Or something that stops the Search command button macro from working (or resets it)? I've tried to copy the apply filter macro and did "=False", but it's not working.

    Thank you for your help.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,824
    I don't use macros. In the button Click event select [Event Procedure], click the ellipsis (...) to open VBA editor, type code in the procedure. Try:
    Me.FilterOn = False
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    MaggieN is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2015
    Posts
    7
    Totally worked! Thank you once again, June7!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 11
    Last Post: 11-19-2013, 03:38 PM
  2. remove toggle filter button!?
    By Wombat in forum Access
    Replies: 1
    Last Post: 05-16-2012, 01:50 PM
  3. Replies: 28
    Last Post: 03-08-2012, 06:47 PM
  4. Replies: 0
    Last Post: 02-15-2011, 01:43 PM
  5. Using ApplyFilter in Form...help please
    By playfuljade in forum Forms
    Replies: 8
    Last Post: 12-19-2005, 09:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums