Results 1 to 3 of 3
  1. #1
    Trojnfn is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    46

    How to clear a search form ?


    I have a search form where I enter a value and click on a command button. All records that correspond to that value are displayed (continuous form). Works fine.

    However, when I exit the form and then go back in, the data from the previous search still populates the screen. The search value/field is blank, but all the previous records are still displayed. How can I clear those values everytime I enter the form (or exit the form) ?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Are you using Filter and FilterOn in code to perform the search? Show the procedure code for analysis. How are you exiting the form - with the X button?
    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
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    Another thing to consider is if you are using the filter but if you are using code to close the form and have selected acSaveYes instead of acSaveNo (like you should) that can cause filters to be saved.

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

Similar Threads

  1. Form Fields Clear
    By rajulasb in forum Access
    Replies: 1
    Last Post: 08-06-2011, 01:11 AM
  2. Clear records off of continuous form
    By Ashe in forum Forms
    Replies: 2
    Last Post: 01-04-2011, 12:27 PM
  3. How to clear the form?
    By Mrcams in forum Access
    Replies: 3
    Last Post: 01-03-2011, 12:15 AM
  4. Command button code to clear form
    By windwardmi in forum Forms
    Replies: 15
    Last Post: 11-21-2010, 03:21 PM
  5. Search and Clear button
    By polk383 in forum Programming
    Replies: 1
    Last Post: 08-30-2006, 08:51 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