Create a new table with the results of a query that uses multiples criterias from 2 different tables

Luthius

Active Member
Joined
Apr 5, 2011
Messages
324
Guys

I have one table that contains a memo field (tblWithMemoField)
The second table has some keywords (tblWithKeyWords)

What I want to do is a query that can generate a table using the field fldCriteria(tblWithKeyWords) to find the records from the tblWithMemoField on field (fldMemo).
There is no relationship between the tables.


tblWithMemoField
IDRemarks
CompanyName
fldMemoThis field will be the target - Memo

<tbody>
</tbody>







tblWithKeyWords
idKeyWord
fldCriteriaMy criteria - Text field

<tbody>
</tbody>






Would be something literally like below - Of course the statement below doesn't work.

Code:
[COLOR=#008000][FONT='inherit'][B]SELECT [/B][/FONT][/COLOR][COLOR=#333333][FONT='inherit']CompanyName [/FONT][/COLOR][COLOR=#008000][B]FROM[/B][/COLOR] tblWithMemoField [COLOR=#008000][FONT='inherit'][B]WHERE[/B][/FONT][/COLOR][COLOR=#333333][FONT='inherit']((([/FONT][/COLOR][COLOR=#333333][FONT='inherit']fldMemo[/FONT][/COLOR][COLOR=#333333][FONT='inherit'])[/FONT][/COLOR][COLOR=#008000][FONT='inherit'][B]LIKE[/B][/FONT][/COLOR][COLOR=#19177C][FONT='inherit']"*"[/FONT][/COLOR][COLOR=#666666][FONT='inherit']+[/FONT][/COLOR][COLOR=#333333][FONT='inherit'][[/FONT][/COLOR][COLOR=#333333][FONT='inherit']tblWithKeyWords[/FONT][/COLOR][COLOR=#333333][FONT='inherit']][/FONT][/COLOR][COLOR=#666666][FONT='inherit']![/FONT][/COLOR][COLOR=#333333][FONT='inherit'][[/FONT][/COLOR][COLOR=#333333][FONT='inherit']fldCriteria[/FONT][/COLOR][COLOR=#333333][FONT='inherit']][/FONT][/COLOR][COLOR=#666666][FONT='inherit']+[/FONT][/COLOR][COLOR=#19177C][FONT='inherit']"*"[/FONT][/COLOR][COLOR=#333333][FONT='inherit']));[/FONT][/COLOR]

How can I do it?

Luthius
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

Forum statistics

Threads
1,213,534
Messages
6,114,184
Members
448,554
Latest member
Gleisner2

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