keyword table

M

Mike D

I have a keyword table with one field called "keyword". I would like to set
up a query to return all records from a second table ("search table") where
the field "description" contains one or more of the keywords. I have tried
using: Like ("*" & [keyword table]![keyword] & "*") but that returns every
record. Any suggestions?
 
K

KARL DEWEY

Put the two tables in your query - not joined.
Add the following in Field list --
X: InStr(1,[YOURTABLE].[YOURFIELD],[keyword table]![keyword])
Use >1 as the criteria.
 
M

Mike D

Thanks Karl! I changed the criteria to >=1 to catch the matches at the
beginning of the string, but otherwise works great.

KARL DEWEY said:
Put the two tables in your query - not joined.
Add the following in Field list --
X: InStr(1,[YOURTABLE].[YOURFIELD],[keyword table]![keyword])
Use >1 as the criteria.

Mike D said:
I have a keyword table with one field called "keyword". I would like to set
up a query to return all records from a second table ("search table") where
the field "description" contains one or more of the keywords. I have tried
using: Like ("*" & [] & "*") but that returns every
record. Any suggestions?
 
Top