Carriage return in a text box in a textbox in report.

G

Guest

Hi! Who knows, why this code make a space but not carriage return?


Me.txtText = rs("companyName") & Chr(13) & Chr(10) & "text1"

When just change ADO RS to a simple text, carriage is working.
 
K

krissco

Hi! Who knows, why this code make a space but not carriage return?

Me.txtText = rs("companyName") & Chr(13) & Chr(10) & "text1"

When just change ADO RS to a simple text, carriage is working.

Try:
Me.txtText = Cstr(Nz(rs("companyName"), "")) & Chr(13) & Chr(10) &
"text1"

-Kris
 

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