"like" search function

G

Guest

I have a contract database. One table includes a field for contract
provisions. I have created a query that allows you to search by different
contract criteria. However, I would like to be able to seach by keyword
found in the contract provision field. For example, the user would open a
form, type in the keyword, which would prompt the query to search by such
keyword and pull up all the contracts and contract provisions that include
that keyword.

I am not sure how to format this in the criteria box. The keyword would be
entered into the following [forms]![frmContracts]![ThisValue1]. Thus, my
thought is that the criteria field in the query should read something along
the lines of: Like"[forms]![frmContracts]![ThisValue1]". But this is not
working because I do not think there is enough specified to use the like
function. I am not sure if I should use where or having.

Thanks!
 
G

Guest

Thank you!!!
--
Andrea


Arvin Meyer said:
You're so close:

Like "*" & [forms]![frmContracts]![ThisValue1] & "*"
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


Andrea said:
I have a contract database. One table includes a field for contract
provisions. I have created a query that allows you to search by different
contract criteria. However, I would like to be able to seach by keyword
found in the contract provision field. For example, the user would open a
form, type in the keyword, which would prompt the query to search by such
keyword and pull up all the contracts and contract provisions that include
that keyword.

I am not sure how to format this in the criteria box. The keyword would
be
entered into the following [forms]![frmContracts]![ThisValue1]. Thus, my
thought is that the criteria field in the query should read something
along
the lines of: Like"[forms]![frmContracts]![ThisValue1]". But this is not
working because I do not think there is enough specified to use the like
function. I am not sure if I should use where or having.

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top