Underline part of the string in a text box

L

LMM

Is there any way to programmatically under line part of a string in a text
box on a report?

Thanks much.
 
A

Allen Browne

That is not possible in the normal Access text box.

If it's a requirement that is worth the bother, you could try the rich text
box from www.lebans.com
 
L

LMM

Allen,
Here is what I am attempting to accomplish.

I am printing a directory and need to underline the person's middle name if
the person goes by the middle name rather than the first name. For example:
John Ray Doe. Ray needs to be underlined if the person is called Ray Doe
rather than John Doe.

I have a yes no field in the table which is set to true if the person uses
the middle name. RTF is not a practical solution.

Is there a way to accuraratly measure the length of the string (name) in
twips and then I could draw my own line in the correct position under the
name field on the report?

Thanks.
 
S

Stephen Lebans

There are functions on my site to return the width of the string passed
to the function but perhaps you do not need them here. I say this
because your issue looks like it only requries a single line solution.
In that case, the simplest method is to use the Print method of the
Report object to render the text programmatically. A sample MDB is here:
http://www.lebans.com/mixbold-plain.htm
Lady.zip is a database containing functions to allow the developer to
mix Bold and Plain formatting within a single Control. Demonstrates how
to use the Print method of the Report object..NEW - Feb. 18/2000
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 

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