I have a question about using UNDERLINE on a form

  • Thread starter Thread starter Jacob
  • Start date Start date
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
 
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.
 
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.
 
Thanks, I will tinker with this. It looks straight forward. Just replace my
code to work with this control.
 
Back
Top