Query Using Like as a Criteria

blongmire

New Member
Joined
Jul 3, 2014
Messages
35
I have 2 tables, the first has Job Titles, I want to search the text of those job titles to see if they match any standard terms stored in my second table.

My second table, which contains the standard terms, has multiple fields I'd like to search through to return the records that match.

For some reason, when I run a query with the Job Titles with a Criteria for Like "*" & [Table 2].[Field 1] & "*" it returns all records from my second table. I'm using the * wildcard as I don't know where in the job titles the standard terms may fall.

The end goal would be to have 1 list of my job title from table 1 and all the field names that matched from table 2 concatenated into 1 string.

I just can't seem to find a way to search through the records in all the fields on Table 2 to return only the values I want.

Does anyone have any ideas?

Thanks!
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
I use this method:
make a form, put a combo box of the Titles.
make a query to search whats in the combo box

query = select * from table2 where [field1] like "*" & forms!myForm!cboTitle & "*"
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,111
Messages
6,128,898
Members
449,477
Latest member
panjongshing

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top