View Full Version : convert carriage return to a space


roly_news
12-16-2002, 08:35 AM
I wish to disallow "carriage returns" in one of my fields

I dont mind if it is converted to a whitespace or simple denied

Why do I want to do this? - I export to pipe | delimited text file which is used to generated html in perl carriage returns seem to make a mess of the file, I guess if I could export without carriage returns that would also work.

Peter D
12-16-2002, 09:53 AM
You can use the function xg_ReplaceAllWith() available in our free Access String Function examples database at http://www.peterssoftware.com/strfn.htm

Ex.:

'* Remove carriage return and line feed from MyString
'* Replace with space.
MyString = xg_ReplaceAllWith(MyString, vbCr, " ")
MyString = xg_ReplaceAllWith(MyString, vbLf, " ")

Hope this helps,