change the font color of just selected text in a subform?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sooli
    New Member
    • Sep 2014
    • 49

    change the font color of just selected text in a subform?

    i want to make it possible for users to change the font color of selected text in a subform. the menus are locked out so the users don't have access to this feature.

    I tried using excel to create the code, but access wants an object, which I thought would be simple, but then realized if I directed it to the "messages" textbox, then the whole thing would be changed... i only want to change the color of the text selected when the button is clicked...

    excel vba is as follows
    Code:
     With Selection.Font
            .Color = -16776961
            .TintAndShade = 0
        End With
  • Seth Schrock
    Recognized Expert Specialist
    • Dec 2010
    • 2965

    #2
    The field that your textbox is bound to must be a memo field set to Rich Text format. You then use HTML tags to set the color for the selected text. It is very tricky to start dealing with that, especially if you want to be able to highlight multiple sections. I would personally try to come up with another solution unless I absolutely had to do it.

    Comment

    Working...