7/7/10

Carriage return

When creating long text strings in VBA and you use Chr(13) you will see that this "Carriage return Character" is represented by a small square in forms or on reports. To avoid this you should use the following structure.

& Chr(13) & Chr(10)

NOTE: They must be used in the displayed order.
13 is a Carriage return
10 is a Line Feed

Also you may use the following
vbCr is a Carriage Return
vbCrLf is a Carriage Return and Line Feed
vbLf is a Line Feed
vbNewLine Is a new Line

No comments: