Results 1 to 6 of 6
  1. #1
    Middlemarch is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2015
    Posts
    479

    Rich text control

    I've been curious about rich text capabilty for some time but never learnt much about it until finding a tutorial on line.
    This uses bound text boxes and presents a menu when you highlight something, to set attributes for for text that's already there.
    Then the underlying table also reflects the changes.
    But what if I wanted an unbound text box, populated in VBA with a choice of my colors, fonts and text. I assume I add the http codes (once I know what they are)


    into the text box with the text? Is this correct and does Access have any tools for this?
    Any info appreciated.

  2. #2
    Middlemarch is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2015
    Posts
    479
    Trying to see some results ... have Form with 2 textboxes.
    Why does is one empty - is this because it's rich text is bad ? It was something I copied from a table, so may have a typo.
    But more oddly, why does a click in lower text box copy in the contents of text box above it. There's no instruction to do this.
    Attached Files Attached Files

  3. #3
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,127
    Error in your code so expression y cannot be resolved.
    Clicking in the textbox retrieves the value in memory. In this case, the value of x

    To fix, fontcolor should be font color.

    Whilst learning about rich text, you may find this utility useful: Rich Text Editor (isladogs.co.uk)
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  4. #4
    Middlemarch is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2015
    Posts
    479
    Thank you Colin, just been reading that link. I'm starting from scratch, so a few basics first.
    The click effect, that's not usual is it, or happens because of rich text? The partial highlighting also changes color when clicked.
    The terms used like 'strong' etc, is there a list of them anywhere?

  5. #5
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,127
    I think its unlikely to happen with plain text unless you can create a situation where plain text entry also can't be resolved.
    Unable to replicate the effect of the highlighting changing colour.

    I usually use the rich text toolbar to apply formatting.
    However an easy way to learn the different commands would be to display the rich text in a plain text control (or query field) as I did in my example app.
    Rich text is a subset of HTML so you could try HTML Text Formatting (w3schools.com) Otherwise suggest you Google it
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  6. #6
    Middlemarch is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2015
    Posts
    479
    Thank you Colin, I should be able to make some headway with that.

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

Similar Threads

  1. Setting Font size in text box, set to rich text
    By Miles R in forum Programming
    Replies: 5
    Last Post: 09-01-2021, 11:55 AM
  2. Replies: 8
    Last Post: 06-18-2021, 04:22 PM
  3. Rich text field not displaying rich text properly
    By CodeLiftSleep in forum Access
    Replies: 4
    Last Post: 01-24-2018, 10:59 AM
  4. Replies: 3
    Last Post: 06-04-2017, 01:02 PM
  5. Replies: 4
    Last Post: 08-07-2015, 07:49 AM

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