rrh said:
Access 97
It erases everything in the text field.
I followed the article to the letter. Do I need to modify
and how. with what.
PMFBI
I have to wonder if your Excel "carriage return"
is Chr(13) & Chr(10), or only Chr(13),
or only Chr(10)?
Is it possible you are only replacing one
or the other of CR LF? If that was the
case, I could imagine "not seeing anything"
until I made the row taller if you only
replaced CR.
In 97 I always used the following function
from Viktor Umanskiy:
Function MyReplace(Orig As String, Find As String, Repl As String) As String
Dim k As Long, L1 As Long, M As Long
MyReplace = ""
L1 = Len(Find) - 1
M = 1
k = InStr(Orig, Find)
Do While k > 0
MyReplace = MyReplace & Mid(Orig, M, k - 1) & Repl
M = M + k + L1
k = InStr(Mid(Orig, M), Find)
Loop
MyReplace = MyReplace & Mid(Orig, M)
End Function
Save in a module, then update query would be like:
UPDATE YourTable
SET [yourfield] = MyReplace([yourField], Chr(13) & Chr(10), "")
Again, apologies for butting in.
Good luck,
Gary Walter