Carriage returns in text boxes

D

David Cleave

Why can't I use a carriage return in a text box?

When I set the value of a text box like this:

[Text box] = "Line 1" & chr(13) & "Line 2"

The text box displays:

Line1Line2

It clearly can display carriage returns, because if you
paste text from Word which includes a carriage return, the
text box shows it properly.

So how do I include carriage returns when I specify the
contents of a text box from Visual Basic?

Thanks

David
 
R

Rick B

Fred just answered a very similar question yesterday....

As Control Source of an UNBOUND text control:
=[Field1] & chr(13) & chr(10) & [Field2]

Note.. the chr(13) and chr(10) must be in that order.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.

------------------------------------------------------------



Why can't I use a carriage return in a text box?

When I set the value of a text box like this:

[Text box] = "Line 1" & chr(13) & "Line 2"

The text box displays:

Line1Line2

It clearly can display carriage returns, because if you
paste text from Word which includes a carriage return, the
text box shows it properly.

So how do I include carriage returns when I specify the
contents of a text box from Visual Basic?

Thanks

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