Results 1 to 2 of 2
  1. #1
    Power is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    2

    Reset Filter On Close

    Hello, I'm fairly new to Access and VBA so forgive my ignorance. My coding is less than efficient but most of the time things work. I have a form that opens with basic information: UserName, Location, AssetNum, phonenum....I found that if I right click in the AssetNum field and select Number Filters>Equals and enter a number, the form filters for just that record. However, I want to clear the filter using the On Close event but not sure how. I have tried several approaches and get an syntax error each time I close the form. Can someone tell me if there is a simple line of code to do this? Such as Me.filter = "AssetNum = & """. Do I reference the form or the controls property?

    BTW, I searched the forum for Clear Filter, Reset Filter and others but nothing seemed to work.



    Thank you in advance.

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Hi

    To remove the filter from a form you could try using:
    Me.Filter = ""
    Me.FilterOn = False
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

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

Similar Threads

  1. Replies: 2
    Last Post: 06-20-2011, 03:10 PM
  2. Reset imageBox on a form?
    By bosve73 in forum Forms
    Replies: 0
    Last Post: 08-11-2010, 07:16 AM
  3. How to Reset Comboboxes
    By bbarrene in forum Programming
    Replies: 5
    Last Post: 01-23-2010, 11:11 PM
  4. Create "reset filter" button
    By vanlanjl in forum Access
    Replies: 0
    Last Post: 03-03-2009, 07:36 AM
  5. reset primary key
    By emilylu3 in forum Access
    Replies: 1
    Last Post: 12-09-2005, 03:27 PM

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