• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 189
  • Last Modified:

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
0
tahirih
Asked:
tahirih
  • 4
  • 2
1 Solution
 
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
 
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
tahirihAuthor Commented:
The code version I have of this is not working either. Thanks
0
 
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
 
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

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now