Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Wild Cards

Status
Not open for further replies.

Krash878

Programmer
May 8, 2001
172
US
I have a form that lets me search on a number of different feilds by using option groups and a query for each option. What I would like to do is have the text box where I input the search criteria automaticly but * in the beginning of the text and at the end of the text. So if I was searching under first name for Kenny it would like *kenny* . Right now I can manually input the *'s but I would like to code it to the text box so I can search a 4 digit extension by any digit or digits or search by our other ways of seraching. I was told that this can not be done but I think by some kind of append string function it can be. Thanks to whoever can help.

Kenny
 
Maybe this query I once used will help u

Select It_Id, It_Name, It_Rate from Items
Where It_Name Like "*" & [Enter Company Name] & "*";

I think u can use the same logic in form on text box. Let me if ur problem still remains.

Cheers!
Aqif
 
Where did you put that code at? Is it in the text box or in the query?
Thanks
Kenny
 
Where would I put it in here to make a wildcard all the time

Like [forms]![frmClientSearch]![txtSearch]

Thanks

Kenny
 
Put this in the query in the criteria of the field you are trying to search:

Like "*" & [forms]![frmClientSearch]![txtSearch] & "*"

HTH Joe Miller
joe.miller@flotech.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top