Export to a text file question

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

I am not sure if this is the right Forum

When I export a memo filed to a text file, some memo fields are shown on
multiple lines. When examining the data, I do not see anything that would
cause this.

Is it possible that there is a carriage return that the user entered and if
so, how do I find it and delete it?

Thanks
 
Dave said:
When I export a memo filed to a text file, some memo fields are shown on
multiple lines. When examining the data, I do not see anything that would
cause this.

Is it possible that there is a carriage return that the user entered and if
so, how do I find it and delete it?


Sure it's possible, a user can enter a new line just by
using Ctrl + Enter. Internally a new line in Access is the
CR and LF characters ( Chr(13) & Chr(10) ) so you can search
for that string using the InStr function. If allyou want to
do is remove the new line sequences and use a space instead,
then just use Replace(memofield, Chr(13) & Chr(10), " ")
 
Thanks for the reposne.

Is there a way to search the table using Find and Rplace to eliminate the
carriage returns.

Thanks
 
AFAIK, the Find and Replace feature will not accept control
characters or an expression, so, No, you can not do that.

OTOH, it's pretty easy to slap together an UPDATE query that
will do it:

UPDATE thetable
SET memofield = Replace(memofield, Chr(13) & Chr(10), " ")
WHERE InStr(memofield, Chr(13) & Chr(10)) > 0
 
Thanks



Marshall Barton said:
AFAIK, the Find and Replace feature will not accept control
characters or an expression, so, No, you can not do that.

OTOH, it's pretty easy to slap together an UPDATE query that
will do it:

UPDATE thetable
SET memofield = Replace(memofield, Chr(13) & Chr(10), " ")
WHERE InStr(memofield, Chr(13) & Chr(10)) > 0
--
Marsh
MVP [MS Access]

Is there a way to search the table using Find and Rplace to eliminate the
carriage returns.
 
Back
Top