I have created a form with a text box (txtInput). My hope is to be
able to enter a string to be used as criteria in a query. For example,
I want to be able to enter *elect* into the text box and have the query
result in anything that has "electrical" or "electric" in it. The way
that I have built the query inlcudes the following for the criteria.
[Forms]![query form]![txtInput]
It doesn't work. If I substitute the above criteria with "*electr*" -
it works fine.
This is modeled after a similar structure that uses a combobox instead
of a text box which also works.
Any ideas?
fredg - 21 Nov 2005 23:04 GMT
> I have created a form with a text box (txtInput). My hope is to be
> able to enter a string to be used as criteria in a query. For example,
[quoted text clipped - 9 lines]
>
> Any ideas?
Is the criteria Field's datatype Text?
Change the query criteria to:
Like "*" & [Forms]![query form]![txtInput] & "*"
Then just enter elect (not *elect*) in the text control.
The form must be open when the query is run.

Signature
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail