Find, compare and replace in VBA

Marcel2586

Registered User.
Local time
Today, 02:12
Joined
Mar 1, 2012
Messages
41
Hello all,

I need a function to replace unwanted double spaces, points etc. etc. from a record set.
But words like sugar-free and custom-built may not be affected by replace.
so a record like this;
sugar-free chewing ,gum custom-build-bubbles fo;r sale.
has to change to;
sugar-free chewing gum custom-build bubbles for sale
I tried a query with Description1: Replace([Description],"-"," ") And Replace([Description],"."," ")
But this result in loosing approximately 1000 records and why? I have no clue.
Thanks in advance,
Marcel.
 
You could create a public Function in a module and use that in the query. You can then test the function to make sure that it returns the correct value. This will let you use breakpoints and single step through the code to see what is happening.
 

Users who are viewing this thread

Back
Top Bottom