Results 1 to 7 of 7
  1. #1
    cbramsey is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2017
    Posts
    35

    Clear previous data from search

    I have a form that has a box that will allow user to search by owner name.



    They type in owner name and click the button and it executes the query to find all tickets with that owner name. My problem is, when they go back and search another name, it doesn't search the new name, it will only search the previous entry. If the close and reopen the data base then they can search again. I know there is some way to reset the query, but for the life of me I can't find it.

    Thanks for any help.

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    You could reset the "box" with a zero length string ("").
    You might also consider using Find as you type approach, or a dropdown combo box with Owner names.
    This would allow user to select a name and would avoid typos.

  3. #3
    cbramsey is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2017
    Posts
    35
    it is like I need to reset the query or something.

    Here is a break down of the process

    Type in owner name in form and click 'find by owner'.

    Find by owner button feeds the owner name that was typed into the find by owner query and runs query

    Form opens with all of the data from the query

    When I return to the original form and enter another owner name and click the button it requeries the same owner that was searched for the first time. It is like I need a way to clear all of the data after each query. I have a button that returns to home from the form with the query data on it. is there a command I could put in that to clear the data?

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    Can you post a copy of the database in zip format?

  5. #5
    cbramsey is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2017
    Posts
    35
    i can't unfortunately, too much personal identifying information involved

  6. #6
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,405
    Perhaps you could post the code behind the 'find by owner' button and any other code, image that could help. It might be enough to give us a clue.

  7. #7
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    Make a copy. Remove most of the data. Anonymize some names with Porky Pig, Donald Duck etc.
    All we want to resolve is the textbox after a search, right?

    All you need is 2 or 3 records.

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

Similar Threads

  1. Clear Search Form
    By armyofdux in forum Forms
    Replies: 9
    Last Post: 03-03-2015, 06:24 AM
  2. Replies: 2
    Last Post: 08-03-2013, 03:41 PM
  3. Search field will not clear
    By SemiAuto40 in forum Programming
    Replies: 1
    Last Post: 10-13-2011, 08:23 PM
  4. How to clear a search form ?
    By Trojnfn in forum Access
    Replies: 2
    Last Post: 10-05-2011, 01:12 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