By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,961 Members | 2,492 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,961 IT Pros & Developers. It's quick & easy.

User Input Text Boxes for Query Criteria

waynetheengineer
P: 26
Hi,

I was wondering if anyone had any suggestions on my database:

I have a form that accepts user input into a single text box. When the OK button is hit, a query should search for all records that contain the user inputted text for a specific field in the query's criteria section. I want the criteria to search for any matching part of the word, for example:

If the user enters in the text box: rabbit
The query should return all results that have the word rabbit in it:
green rabbit, rabbit soup, orange rabbit, rabbit ears etc.

This is what I have so far in the query criteria section:

Like "*[Forms]![frmSearch]![txtSearchAnimal]*"

but it returns no search results.

Any suggestions?

Thank you :)

Wayne.
Mar 27 '07 #1
Share this Question
Share on Google+
4 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
Hi Wayne,

try ...
Expand|Select|Wrap|Line Numbers
  1. Like "*" & [Forms]![frmSearch]![txtSearchAnimal] & "*"
  2.  
Mary
Mar 27 '07 #2

waynetheengineer
P: 26
Hi Mary,
Thank you very much! It works perfectly :)
Wayne.


Hi Wayne,

try ...
Expand|Select|Wrap|Line Numbers
  1. Like "*" & [Forms]![frmSearch]![txtSearchAnimal] & "*"
  2.  
Mary
Mar 27 '07 #3

MMcCarthy
Expert Mod 10K+
P: 14,534
Hi Mary,
Thank you very much! It works perfectly :)
Wayne.
You're welcome!
Mar 27 '07 #4

P: 1
This works like a dream.

thanks

kev
Apr 23 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.