Carriage Return Line Feed

C

Centaur

In access basic - I want to write at the end of a line in a memo field (from
access basic) a carriage return and line feed and resume more text. I
thought that chr$(10) and chr$(13) did this but it is just putting two
vertical lines in there and cr lf.

Context is something like this

dim cr as string
dim mem as string
cr = chr$(10) + chr$(13)
mem = "Lots of text" + cr " more text" + cr + "even more text"

Any help would be appreciated please

Centaur
 
C

Centaur

Many thanks for that - I am so ingrained in the old fasioned basic from the
older acces's I really must get myself up to speed.

It probably because I don't have to use it too often

Best wishes and thank you

Centaur
 
D

Dirk Goldgar

Centaur said:
Many thanks for that - I am so ingrained in the old fasioned basic
from the older acces's I really must get myself up to speed.

It probably because I don't have to use it too often

Best wishes and thank you

Centaur

Incidentally, the defined constant vbCrLf = Chr(13) & Chr(10). Your
code had the two values in the reverse order; that's why they weren't
recognized as a line break. There's also the defined constant
vbNewLine, which equals the same thing.
 

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