View Full Version : Want query critera to match any part of a string


coolcps
05-31-2009, 05:20 AM
I have a query where the criteria is entered in a form through the user. Lets say that I have the fields of Money, Honey, Pickles, Phone. I would like the user to be able to type in a string such as "one" and have it return money, honey and phone. (since they all contain that string)
Or if the user types "e" to bring them all up because they all contain e. Something like a simple find string and then display them all.

Also I would like to have it so the default value of this criteria will show all of the records. Any input is greatly appreciated!

Kiwiman
05-31-2009, 05:30 AM
Howzit

You want to use the like syntax in the criteria part of your query


Like "*" & [Forms]![yourform]![yourcontrol] & "*"

coolcps
05-31-2009, 06:37 AM
Kiwiman, thank you for the quick help, works perfectly!