vbCrlf, vbLf, vbCr

L

Lars Brownies

When using vbCrlf, vbLf, vbCr in code I don't see any difference between
them. Is there any reason to use one over the other?
Thanks,
Lars
 
D

Dirk Goldgar

Lars Brownies said:
When using vbCrlf, vbLf, vbCr in code I don't see any difference between
them. Is there any reason to use one over the other?


vbCr = carriage-return character = ASCII 13
vbLf = line-feed character = ASCII 10
vbCrLf = carriage-return followed by line-feed = ASCII 13, 10
vbNewLine = the same as vbCrLf

In text boxes, Access recognizes only the carriage-return+line-feed
combination (vbCrLf, or vbNewLine) as a new line. CR alone or LF alone will
not be recognized as a line break. In the Prompt argument of the MsgBox
function, vbCr, vbCr, and vbCrLf all work equally well as line breaks. I
generally use vbCr in calls to MsgBox, but I know that when I'm pushing text
into a text box I have to use vbCrLf to separate lines.
 
D

Dirk Goldgar

Lars Brownies said:
When using vbCrlf, vbLf, vbCr in code I don't see any difference between
them. Is there any reason to use one over the other?


vbCr = carriage-return character = ASCII 13
vbLf = line-feed character = ASCII 10
vbCrLf = carriage-return followed by line-feed = ASCII 13, 10
vbNewLine = the same as vbCrLf

In text boxes, Access recognizes only the carriage-return+line-feed
combination (vbCrLf, or vbNewLine) as a new line. CR alone or LF alone will
not be recognized as a line break. In the Prompt argument of the MsgBox
function, vbCr, vbCr, and vbCrLf all work equally well as line breaks. I
generally use vbCr in calls to MsgBox, but I know that when I'm pushing text
into a text box I have to use vbCrLf to separate lines.
 
L

Lars Brownies

Dirk Goldgar said:
vbCr = carriage-return character = ASCII 13
vbLf = line-feed character = ASCII 10
vbCrLf = carriage-return followed by line-feed = ASCII 13, 10
vbNewLine = the same as vbCrLf

In text boxes, Access recognizes only the carriage-return+line-feed
combination (vbCrLf, or vbNewLine) as a new line. CR alone or LF alone
will not be recognized as a line break. In the Prompt argument of the
MsgBox function, vbCr, vbCr, and vbCrLf all work equally well as line
breaks. I generally use vbCr in calls to MsgBox, but I know that when I'm
pushing text into a text box I have to use vbCrLf to separate lines.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

Thanks for clearing that up!
Lars
 
L

Lars Brownies

Dirk Goldgar said:
vbCr = carriage-return character = ASCII 13
vbLf = line-feed character = ASCII 10
vbCrLf = carriage-return followed by line-feed = ASCII 13, 10
vbNewLine = the same as vbCrLf

In text boxes, Access recognizes only the carriage-return+line-feed
combination (vbCrLf, or vbNewLine) as a new line. CR alone or LF alone
will not be recognized as a line break. In the Prompt argument of the
MsgBox function, vbCr, vbCr, and vbCrLf all work equally well as line
breaks. I generally use vbCr in calls to MsgBox, but I know that when I'm
pushing text into a text box I have to use vbCrLf to separate lines.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

Thanks for clearing that up!
Lars
 
A

Aaron

Lars Brownies said:
When using vbCrlf, vbLf, vbCr in code I don't see any difference between
them. Is there any reason to use one over the other?
Thanks,
Lars

OK
 

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