Access - Cells Containing Key Words

Hi,

Based on Table A and Table B, I will be creating a query wher I will extract from Table B cells that have key words in A.

In Excel, we use "Contains." Is "Like" the only option in Access - i.e. in Design View, under criteria I enter "Like Red" OR "Like Ball."

Thanks
tahirihAsked:
Who is Participating?
 
Rey Obrero (Capricorn1)Commented:
<Sorry - let me clarify, I am only using Table A to generate the output table.>

so where will the input "jumps" and "leaps" come from?



select * from tableA
where field1 like "*jumps*" and field1 like "*leaps*"
0
 
Rey Obrero (Capricorn1)Commented:
create a query like this

select * from tableB, tableA
where TableB.field1 like "*" & tableA.field1 & "*"
0
 
tahirihAuthor Commented:
In Access - how can I create this query so that the output table will be based on a word(s) contained in Table A.

Example - Table A has three rows

"The dog jumps"
"The cat jumps"
"The dog jumps and leaps"

I want to search on "jumps" and "leaps", and the output table should have the first and third statements. "Like" does not work.

Thanks
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
tahirihAuthor Commented:
Sorry - let me clarify, I am only using Table A to generate the output table.

How can I do this in design view?
0
 
tahirihAuthor Commented:
The code version I have of this is not working either. Thanks
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Given your 3 records:

"The dog jumps"
"The cat jumps"
"The dog jumps and leaps"

Searching for "jumps" OR "leaps" would return all records.

Searching for "jumps" AND "leaps" would return one record.

So I'm not sure how you would return only the 1st and 3rd records using the keywords "jumps" and "leaps", unless you also EXCLUDE the keyword "cat".

In other words, you need to more fully define what you want to do.
0
 
tahirihAuthor Commented:
Thank you
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.