Does field contain string from another field in a seperate table

swaink

Active Member
Joined
Feb 15, 2002
Messages
432
Morning all please bear with me please as Access is not my strong point but I'm working on it

I need to update a field in one table to show a null value if it contains certain strings

For example if the field contains "Company" or "International" of "Construction" etc I will make those fields blank

To speed the process I have created a separate table called [CleanUp] and in this table I have listed all of the variables I want to search for include those mentioned. In my query I have shown just two fields "Organisation", "Contact" both from the Master Table, at the minute Contact is a straight copy of Organisation. The aim is to blank out any of the fields in the "Contact" column where they contain my list of names in the [ContClean] table

Currently I have tried to use Where "Contact" in table one is like the "LikeNames" in my second table
I.E Like ('*'+[ContClean].[LikeName]+'*') but this is not returning field with those names listed I seem to get everything regardless

All help is appreciated and this ine has me stumped for the minute

Thank you

Kevin
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Ok solved the issue of referring to my but am finding that it does rum rather slow

My list in the [ContClean] table contains circa 100 rows so am guessing there is an issue with constantly referring to the table :(
 
Upvote 0
Try this in your WHERE clause

Code:
 UPDATE Table1 SET Table1.NameField = Null
WHERE NameField LIKE "Company*" OR NameField LIKE "International" OR NameField LIKE "Construction";
 
Upvote 0

Forum statistics

Threads
1,215,143
Messages
6,123,287
Members
449,094
Latest member
GoToLeep

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