INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

conconate two different strings in a text box

conconate two different strings in a text box

(OP)
I have a text box that only part of it needs to be underlined. I've tried to enter the text in one text box but it doesn't let me underline just the parts shown below.

What I need is...
Non Compliance with any terms or conditions of this permit or Section 814 of the 2015 xxxx Plumbing
and Fuel Gas Code
shall constitute a violation and be grounds for enforcement action, as outlined in xxxx's Enforcement Response Plan. Such enforcement action may include civil citations and permit suspension or revocation.

In the event that this permit expires, is revoked, or otherwise made invalid, all wastewater
discharges into the sewer system shall immediately cease.

This permit is granted to the above vehicle, by the xxxx, for the time period set forth as follows:

What I have is....

=IIf([TRANSACT]="ZERO DISCHARGE","","Non Compliance with any terms or conditions of this permit or Section 814 of the 2015 xxxx Plumbing
and Fuel Gas Code shall constitute a violation and be grounds for enforcement action, as outlined in xxxx's Enforcement Response Plan. Such enforcement action may include civil citations and permit suspension or revocation." & (Chr(13)+Chr(10)) & (Chr(13)+Chr(10)) & "In the event that this permit expires, is revoked, or otherwise made invalid, all wastewater discharges into the sewer system shall immediately cease." & (Chr(13)+Chr(10)) & (Chr(13)+Chr(10)) & "This permit is granted to the above vehicle, by the xxxx, for the time period set forth as follows:")


currently I took the underlined portion and stuffed it into another text box and then tried to line the 2 boxes up. This is ok until they make wording changes then it's back to guessing on placement. Also, since there are different types of permits, I actuall have another box that I have to make the same changes to so depending on the type of permit, only one of the boxes show at any given time.

There has got to be an easier way :) Any suggestions??

RE: conconate two different strings in a text box

You need to set the textbox text format property to RichText. You can now use all the formatting controls on parts of text. So if you bolded, colored, or underlined a section what happens in the background is that text gets surrounded by rich text tags. You just do not see them, but you see the result.

So programmatically you need to add the tags. See thread thread702-1676863: Using Rich Text Formatting with code and related threads.

"This is how to <div><u>" & "underline" & "</u></div> some Text"

A good way to learn the tags is to make a memo field, and bind two textboxes to the memofield. Make one rich text and the other plain text. Format the rich text using the formatting controls, and in the plain text box you will see the tags.

RE: conconate two different strings in a text box

Actually the easiest solution is to make a small table and have your formatted text in there. You can then join on that or use a dlookup. That way no need for any code. Just format the text in the rich text field.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close