My searches indicate I should be able to use this:
This isn't working for me.Code:EventNotes = Replace(EventNotes, Chr(13) & Chr(10), "")
My searches indicate I should be able to use this:
This isn't working for me.Code:EventNotes = Replace(EventNotes, Chr(13) & Chr(10), "")
try:
Replace(EventNotes, vbcrlf, " ")
Same thing, nothing happens.
If I use this on long text field:
on a field that contains:Code:EventNotes = Replace(EventNotes, "+", "") EventNotes = Replace(EventNotes, vbcrlf, "")
+ testing
123
I get:
testing
123
but I can't seem to remove the line between texts
Try adding the start optional parameter
Replace(EventNotes , Chr(13) & Chr(10),' ',1)
I had a weird fault with it not working without that.
Also try it on a short text version in case it's an issue with the long text field.
Is this RTF - the char codes might be completely different?
DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
Please use the star below the post to say thanks if we have helped !
↓↓ It's down here ↓↓
Yes it is RTF
It seemed to work with Short Text version, only it deleted all carriage returns
RTF is a whole 'nother ball game. The problematic "characters" or codes are likely <div> or <P> or <B> but likely just <div>.
Such formatting is ignored by the apps that render the plain text, but they are still there. If you test for Left(strMyString,3) where my string contains "dog" with plain text you will get 'dog'. With rtf you will get <di
You will have to output some of your records/fields into code or the immediate window of the vb editor to see what you're dealing with. If you don't need font formatting in the field, save yourself a lot of headaches and format it as plain text. Otherwise you're stuck with having to find and delete not only leading tags, but closing ones as well.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.