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!

Find word INSTR 1

Status
Not open for further replies.

IANGRAND

Technical User
Jul 29, 2003
92
GB
I am running a query to find a user defined word within a string. Currently the code i use in the query is as follows:

Like [Forms]![IANS_FORM]![Text7] & "*"

However, this pulls through the text strings where the user defined word is at the start of the sentence. Is there a way to use INSTR within a query so it will pull through data no matter where the word occurs within the string?

If so, what will the code look like?

Regards

Ian Grand

 
Code:
Like "*" & [Forms]![IANS_FORM]![Text7] & "*"
That will look for that word in any part of the field.

Hope this helps


HarleyQuinn
---------------------------------
Help us to help you,
read FAQ222-2244 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top