Results 1 to 2 of 2
  1. #1
    Gina Maylone is offline Always learning
    Windows 10 Access 2016
    Join Date
    Jun 2013
    Location
    Afton, MN
    Posts
    544

    Clear filter on enter? on got focus? on something else?

    Good morning all!

    I'm struggling with a rather rudimentary issue. I have a form with 3 combo boxes as search fields. Each works fine, what I want to accomplish is if someone wishes to search for another record, I want the previous filter to be cleared and the combo boxes emptied. I have
    Code:
    Me.Filter = ""
    Me.Combo69 = ""
    Me.Combo71 = ""
    Me.Combo73 = ""
    Me.WildProjectName = ""
    which works fine as well. I have this currently on the Got Focus event of the field. (had it On Enter first). Both ways cause the need to click the drop down twice. So when you enter the field it clears everything and the drop down list disappears, and you have to choose it again. What am I missing? Should I put it somewhere else? Or do I really have to have a separate button to clear the filter and boxes? That would still require two clicks.

    Thanks in advance!!

  2. #2
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Not sure if by "field" you mean the first combo so this may not be helpful. Consider using the .Dropdown method if the combo value is "" ?
    (on enter event).
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Set Focus and Clear Control on Duplicate Code
    By billgyrotech1 in forum Programming
    Replies: 4
    Last Post: 06-27-2019, 11:37 AM
  2. Replies: 11
    Last Post: 11-20-2017, 07:50 AM
  3. Replies: 6
    Last Post: 11-15-2016, 03:25 PM
  4. How to clear filter when I close out tables?
    By wuzhuo77 in forum Access
    Replies: 5
    Last Post: 07-21-2015, 11:16 AM
  5. clear filter
    By amerifax in forum Access
    Replies: 2
    Last Post: 05-30-2013, 05:11 AM

Tags for this Thread

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