Multi Select PARAMETER QUERY

sameersabri

New member
Local time
Today, 21:13
Joined
Jan 14, 2016
Messages
5
Hello friends!

I need to remove part of string from Table1, FieldName "Name", I can do it manually using parameter, but I want to paste the whole list at once, can you please guide me how to do this.

For example: from Field "Name" I want to delete (ac,bc,gc,dc,gg)

I use this function to do it manually: UPDATE Table1 SET Table1.Name = Replace(Name,[Enter your data],'');

many thanks,
 
You would need to either create a table with your replacement values and search values in it, then run a simple update query based on joining the new table to your existing data, or use VBA to create a loop to search for each value and replace it with the replacement you want.

The first method would probably be simpler and easier to construct and use.

Also I think 'Name' is a reserved word in access so might be worth changing as it could lead to errors later.
 
I want to delete part of the string from it.
For example, the entry in that field could be "DM gmbh store". The "gmbh" is what I am looking at deleting from all fields. and I have another table with all the list with has to be deleted from main table. How can I link my list with main table and delete everything at once?

Plz
 
Set this up as a select query first so you don't break anything.

Bring both tables into the query design.
In the criteria of your main table search field add Like "*" & [YourSearchField] & "*"

This should find the examples you are looking for. Bear in mind this may take a long time to run if you have lots of records or lots of search examples you are trying to find. If you have too many it might time out.

The next stage would be to delete the matching text. That will require changing the query, but I think you know how to do that.
 

Users who are viewing this thread

Back
Top Bottom