Results 1 to 5 of 5
  1. #1
    CodeLiftSleep is offline Advanced Beginner
    Windows 10 Access 2013 32bit
    Join Date
    May 2017
    Posts
    48

    Rich text field not displaying rich text properly

    I have a Comments field in my table that is set to Long Text and format as Rich Text.



    On the form, I have a text box that allows users to type in their Comments that has its format set to rich text also, it saves the formatting to the table properly but then it also displays the formatting instead of just displaying what the formatting is supposed to actually do. What am I doing wrong here?

    All I want to be able to do is to have the comments have a Date in bold, followed by their comments they type in from the text box and then have it do a line break to start on a new line.

    An example:

    What I typed in the text box: <b> This should be bold</b>

    What I see when it displays the comments: <div>&lt;b&gt;This should be bold;&lt/b&gt;</div>

    What I want to see: This should be bold

    How can I achieve this?

  2. #2
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    You have to set the Rich Text property of the control as well as the table. See Data tab of property sheet.
    EDIT:
    Sorry, I see you did that
    I have a text box that allows users to type in their Comments that has its format set to rich text also
    Will have to re-think, except maybe you're adding the html tags, which I believe you should not. Use keyboard to format, same as you would in a Word document, for example. Ctrl B to cycle bold.
    Last edited by Micron; 07-31-2017 at 07:14 PM. Reason: added info
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    CodeLiftSleep is offline Advanced Beginner
    Windows 10 Access 2013 32bit
    Join Date
    May 2017
    Posts
    48
    Quote Originally Posted by Micron View Post
    You have to set the Rich Text property of the control as well as the table. See Data tab of property sheet.
    EDIT:
    Sorry, I see you did that
    Will have to re-think, except maybe you're adding the html tags, which I believe you should not. Use keyboard to format, same as you would in a Word document, for example. Ctrl B to cycle bold.
    Got it working finally...html works fine for rich text, it's a subset of html...

    now the issue I have is I need to display it in the controltip when I'm on another page but it doesn't allow rich text formatting. When I use plaintext() it still shows the html formatting. So I'm going to need to parse out the html before displaying it, which really isn't too difficult.

  4. #4
    SierraJuliet's Avatar
    SierraJuliet is offline Competent Performer
    Windows 7 64bit Access 2013 64bit
    Join Date
    Dec 2017
    Location
    Earth
    Posts
    211
    HTML as we know it runs on rich text; however, may run on plain text without all the fancy formating and graphics.
    Notepad as we know it runs on plain text.

  5. #5
    SierraJuliet's Avatar
    SierraJuliet is offline Competent Performer
    Windows 7 64bit Access 2013 64bit
    Join Date
    Dec 2017
    Location
    Earth
    Posts
    211
    It shows HTML text because ControlTips display plain text.

    If you need to call an HTML formatted object as a ControlTip then try setting a popup (your HTML placed in a mini form) that is anchored to a particular point when the mouse hovers (On Mouse Move [Event Procedure]) over the area.

    Alternatively take a look at this because it covers the concept I am referring to: https://www.devhut.net/2016/10/18/en...for-ms-access/

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 06-04-2017, 01:02 PM
  2. Rich Text Not Displaying Correctly (Unordered List)
    By ohmydatabase in forum Access
    Replies: 2
    Last Post: 05-11-2017, 02:22 PM
  3. Rich text field odd behavior
    By Gina Maylone in forum Access
    Replies: 1
    Last Post: 12-29-2015, 03:37 PM
  4. Replies: 4
    Last Post: 08-07-2015, 07:49 AM
  5. Set format of rich text field
    By silverspr in forum Programming
    Replies: 0
    Last Post: 03-28-2011, 09:07 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums