Query Search Criteria User Input

  • I would like to make a query that allows the user to be able to search my Description field. I dont want the user to have to open the query in design mode and enter *Jim* under criteria.

    I found this code:

    Like "*" & [Forms]![Search]![ Emp Name] &"*"

    I entered this in the criteria. Then I created a Form called "Search" with a field named "Emp Name". I then created a button that opens up the query.
    For some reason it is not connecting the Emp Name to the Query.
    Any ideas?

  • Re: Query Search Criteria User Input

    yeah the space is a typo.
    I just assumed it was not connecting. For some reason it is not working.

    When I type in the Emp Name and then hit the button, the query will pop up and shows every record. It does not search for anything, I also dont get any kind of error.
    thanks[hr]*[/hr] Auto Merged Post;[dl]*[/dl]I figured it out. There is probably a better way but I had to base my Search Form on a Table that has just one field called Search.[hr]*[/hr] Auto Merged Post;[dl]*[/dl]Got it to work. There is probably a better way.
    Had to create a table with one field, Search. That table is then connected to the Form Search.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!