Replace Function

gmit

Registered User.
Local time
Today, 21:09
Joined
Jan 27, 2004
Messages
23
Hi there
I need so help with the replace function to replace multiple characters in a sting. The replace function syntax is:

string1 = replace(sting1, "find", "ReplaceWith")

I would like to replace multiple things but I'm not sure of the syntax.

string1 = replace(string1, "Find1","Replace1","Find2","Replac2",etc)

Help!!
 
"Sorry, do them one at a time" is not a very illuminating answer. Not sure what you meant by it, but nesting them was what worked for me, using replace() in a query.
 
The nested suggestion above prompted me to write the following into a query field which worked perfectly so thought I'd post:

Replace((Replace((Replace((Replace((Replace((Replace((Replace((Replace((Replace([Filter],"<>","Does Not Equal ")),"=","Equals ")),">","Greater Than ")),"<","Less Than ")),"'","")),[FieldName],"")),"#","")),")","")),"(","")
 

Users who are viewing this thread

Back
Top Bottom