line feed in a string variable

  • Thread starter Thread starter Laurel
  • Start date Start date
L

Laurel

1 - How do you insert a "line feed" ("new line", "carriage
return") into a string variable, e.g., for display in the
MsgBox function?

2 - Where in HELP can you find information about special
characters such as this and tab, etc.?
 
Laurel said:
1 - How do you insert a "line feed" ("new line", "carriage
return") into a string variable, e.g., for display in the
MsgBox function?

2 - Where in HELP can you find information about special
characters such as this and tab, etc.?

One method of doing so (probably the most commonly used), is to use the
Access constant vbCRLF.

MsgBox "First Line of Text" & vbCRLF & "Second Line of Text"

Regrettably, the Help is not one of Access's better features.
 
2 - Where in HELP can you find information about special
characters such as this and tab, etc.?

I agree with Randy, using a pre-defined Visual Basic is
easier on the memory and produces more readable code. For
a list of pre-defined constants, search the Visual Basic
Help under "Visual Basic Constants".

(Click <Ctrl>-G from the Access window to open the VB
Window b4 invoking Help)

HTH
Kevin Sprinkel
Becker & Frondorf
 
Back
Top