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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using a form field and wild cards in a query

Status
Not open for further replies.

billkeziah

Programmer
May 18, 2001
6
US
I am creating a search form with a text box called text0.

I want to run a query using the asterisk before and after the value of the text box.

I have tried the following:

SELECT * FROM casenumbers WHERE [keyword1] Like [Text0]
SELECT * FROM casenumbers WHERE [keyword1] Like '*[Text0]*'
SELECT * FROM casenumbers WHERE [keyword1] Like '[*Text0*]'
SELECT * FROM casenumbers WHERE [keyword1] Like *[Text0]*
SELECT * FROM casenumbers WHERE [keyword1] Like %[Text0]%
SELECT * FROM casenumbers WHERE [keyword1] Like '%[Text0]%'
SELECT * FROM casenumbers WHERE [keyword1] Like '[%Text0%]'

Nothing seems to work, Please help!
 
SELECT * FROM casenumbers WHERE [keyword1] like '*' & forms!Form1.form.text0 & '*';

i expect a thank you for this
Christiaan Baes
Belgium
"What a wonderfull world" - Louis armstrong
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top