Hi
I am trying to remove a character that I thought was a carriage return from a field. But nothing I do works. I have a function that is supposed to work but doesn’t, I’ve tried evaluate with @ReplaceSubstring but it doesn’t work either.
Here is the string of text, I tought the character was a chr(13) or chr(10)
"JANE DOEJOHN DOE "
Here is the find&replace function i’m using
Function ReplaceSubstring(text As String, tag As String, tval As String) As String
’ Simple Search and Replace function with 3 arguments (if “tag” is not found, “text” will be returned unmodified)
’ text : the text to search in
’ tag : the existing text or string we are looking for in “text”
’ tval : the value that will replace tag
While Instr(1, text, tag) > 0
If Instr(1, text, tag) = 1 Then
text$ = tval$ & Mid(text$, Instr(text$, tag$)+Len(tag$))
Else
text$ = Mid(text$, 1, Instr(text$, tag$)-1) & tval$ & Mid(text$, Instr(text$, tag$)+Len(tag$))
End If
Wend
ReplaceSubstring=text$
End Function
Any ideas at all???