I have a question about using UNDERLINE on a form

J

Jacob

I have a form taht I set up to be able to underline text. The first problem
is that it underlines everything in the memo box and the second is that it
will not save it that way. Is there a way to accomplish this...here is a
copy of the code I placed behind a command button.


If Me.Command2.Caption = "U" Then
Me.txt.FontUnderline = True
Me.Command2.Caption = "U + On"
Else
Me.txt.FontUnderline = False
Me.Command2.Caption = "U"
End If



Jacob
 
D

Douglas J. Steele

Are you using a standard text box or an RTF control? (what version of
Access, too)

If it's just a standard text box, what you're seeing is how it's supposed to
work. Underlining is for the entire control, not just for parts of the text
in it, and formatting isn't stored with the data.
 
F

fredg

I am using a memo box on my control in Access 2003.

Access 2003 controls are either all or none as far as formatting is
concerned, so either the memo field is all underlined or none of it
is.

You would need to install a Rich Text Format (RTF) control if you wish
to format only part of a field.
You can get a free one from
http://www.lebans.com

Access 2007 does have this capability.
 
J

Jacob

Thanks, I will tinker with this. It looks straight forward. Just replace my
code to work with this control.
 

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