Using Replace to add CR/LF's to memo fields

T

tgorelick

I'm importing data into access memo fields. Have had trouble importing
directly and preserving CR/LF's. So, I replaced the CR/LF's in the source
data with a token, imported, and then used the replace function to substitute
Chr(10) and Chr(13) for the token. When I view the data in a datasheet or
access form, while there are line breaks, there are also bar characters on
either side of the breaks. If, however, I hit the "enter" key in a memo
field on an access form, there are obviously no such unreadable characters.
What am I doing wrong?
 
K

Ken Snell [MVP]

Hard to give you any pointers without seeing examples of the original data,
how you converted the original to the "token-containing" data, etc.

Can you give us more info?
 
D

david epsom dot com dot au

The Windows (and Access) standard the other way round: Chr(13)&Chr(10).

You send the Carriage Return (13) first, so that the print
carriage has more time to move. The Line Feed (10) is sent
second, because the rotation of the print roller one line
is typically shorter, and takes less time. The two actions
happen asynchronously, so you start the carriage return,
do the line feed, then wait for the carriage return to end.

Note that this is different from a standard mechanical
typewriter: on a standard mechanical typewriter, the Carriage
Return lever actuates a line feed first (normally a single
line feed, but there is a mechanical adjustment to get it
do double line feeds), and then goes into Carriage Return
mode if you push it further.

(david)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top