Carriage return nuances in textbox

braleyman

New member
Local time
Today, 18:48
Joined
Feb 12, 2015
Messages
8
Hello everyone! This is my first post to this forum. I just joined today!

Here's my issue:

I'm working with a simple text box in an Access 2013 form. The text box is used for taking notes that will be saved when the user is finished. The notes follow a simple template, starting with today's date, a carriage return, and the words "Way Forward:". I'm using the following line of code to achieve this:

Me.txtActionNotes = Date & vbVerticalTab & "Way Forward:"

That works great! It does the job; however, why would it not work using either of the following lines of code?::banghead:

Me.txtActionNotes = Date & CHR$(13) & CHR$(10) & "Way Forward:"
Me.txtActionNotes = Date & vbCr & vbLf & "Way Forward:"
 
What exactly is the point of this specially formatted textbox?
Just looking at Why this is what you want/need? just curious.

This seems like some text/info you might want to have on a form or report to assist the reader/user.

What exactly does not working with that code mean?

If you are putting multiple lines in a textbox, you may have to make the text box "taller" in order to see second, third,...lines.
 
Problem solved!!!

You cannot use CHR$(13) & CHR$(10) in a Rich Text field.
 
jdraw,

Thanks for the quick reply. I realized what I'd done after I posted this thread. Thank you for your time though.

Scott
 
When you post, it is helpful to readers (and you) if you give us a complete description.
Typically enough info to show you issue/opportunity in context; preferably in plain, simple English --no jargon.

I wasn't aware we were talking Rich Text, but then again I didn't ask either.

Glad you have it resolved, and welcome.
 

Users who are viewing this thread

Back
Top Bottom