forcing a carriage return in a text box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm using the expression builder to format a text box based upon a last name
in another box on the same form. I select the Section Chief's last name in a
combo box and then use dlookup, ucase, and left functions to format the
section chief's signature block.

For example if my section chief's first, middle, and last name is "United
States Military", I select the last name of "Military" in the Lead Section
Chief combo box, and my signature block automatically changes to:

UNITED S. MILITARY, MSgt, USAF
Section Chief

It all works perfectly, except depending on the length of name. Sometimes,
"USAF" is on the second line or "Section" is on the first line.

Is there a way to use the expression builder to automatically put "Section
Chief" on the second line and keep the name, rank, and service on the first
line?

Thanks
Dan
 
Strike said:
I'm using the expression builder to format a text box based upon a
last name in another box on the same form. I select the Section
Chief's last name in a combo box and then use dlookup, ucase, and
left functions to format the section chief's signature block.

For example if my section chief's first, middle, and last name is
"United States Military", I select the last name of "Military" in the
Lead Section Chief combo box, and my signature block automatically
changes to:

UNITED S. MILITARY, MSgt, USAF
Section Chief

It all works perfectly, except depending on the length of name.
Sometimes, "USAF" is on the second line or "Section" is on the first
line.

Is there a way to use the expression builder to automatically put
"Section Chief" on the second line and keep the name, rank, and
service on the first line?

Thanks
Dan

You can insert a carriage return and line feed to force a line feed...

="FirstLineText" & Chr(13) & Chr(10) & "SecondLineText"

Now, to force something to stay on the first line strictly depends on the
TextBox being wide enough. Text should not wrap to a new line as long as it can
fit on the existing 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

Back
Top