Q: carriage return in a text field

G

Guest

Hello,
I have a table and there is a text field which holds three short sentences.
I put this text filed in my report and I want to put carriage return between
sentences so that there will be spaces between lines. Is there any way I can
do this?

Thanks,
 
A

Allen Browne

Options:

1. Press Ctrl+Enter.

2. Set the Enter Key Behavior property of the control.

3. Programmatically insert Chr(13) & Chr(10)
 
F

fredg

Hello,
I have a table and there is a text field which holds three short sentences.
I put this text filed in my report and I want to put carriage return between
sentences so that there will be spaces between lines. Is there any way I can
do this?

Thanks,

You can use code in VBA ...

="This is line one." & vbNewLine & "This is line two." & vbNewLine &
"Line 3."

Or, in Access, you can concatenate existing fields in one control
directly in the control source of an unbound control:
="Line one." & chr(13) & chr(10) & "Line two."
or..
=[Field1] & chr(13) & chr(10) & [Field2]

Note that you must use chr(13) & chr(10) IN THAT ORDER.

Or you can do it while entering the data.
Either ...
Set the Enter Key Behavior property of the control to New Line in
Field and then press Enter for a new line.
Or..
Press the Ctrl and Enter key wherever you want the new line.
 

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