View Full Version : need help with (sort of) a search engine


mtimbol
01-30-2001, 03:59 PM
Hi

I have a table with fields names such as Company, products, etc.

I need help on how to make a form which works like a search engine, to retrieve records in my products
column.

I was planning to make an unbound text box with a command button beside it.
The user enters the keyword in the text box and the command button opens a
query or table which lists all records containing the keyword.

I tried to make one using a query with a criteria parameter referring to my unbound text box
like:

Field: Products
Table: Companies
Sort:
Show:
Criteria: [Form]![Search Form]![Unbound TxtBox Name]

This works fine as long as you know the exact record entry in the table but doesn't return
anything if the word entered lacks even just one character.

I tried using the 'Like *' operator using the parameter above but it doesnt work.

MLT

pdx_man
01-31-2001, 07:50 AM
You would have to use the Like operator, but this should work. I have done something similar. I would suggest messing around with your Like criteria, or post the exact Like clause you are using.
Your map to the control on the form looks funky. Should be [Forms]![Search]![SearchField]

[This message has been edited by pdx_man (edited 01-31-2001).]

mtimbol
02-01-2001, 02:43 PM
solution to my problem:

Like "*"&[textbox name]&"*"