Results 1 to 5 of 5
  1. #1
    ohmydatabase's Avatar
    ohmydatabase is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    Feb 2017
    Posts
    79

    Scrollbar Behavior In a Memo Textbox

    Hello,



    I am trying to understand the behavior a textbox. I currently have a textbox with the TextFromat = Rich Text. I populate this textbox with an html string that I assemble through some VBA. I form a bulleted list that changes quite frequently. The data is a preview for every user to see what they've submitted to the database. I'm quite happy with the html and formatting so I really don't want to change that.

    The Problem: In an attempt to not confuse the user I have disabled the textbox. (I don't want them thinking that editing the text in the textbox changes what they put into the backend) In doing so I also apparently disabled the ability for the user to use the scroll bars!
    I've done some experimenting and now I see that if I enable the textbox, the scrollbars will appear, but all of the text is highlighted... I'm confused with this behavior and why Access behaves this way.

    What I Want: I want the user to be able to scroll (vertically) using this textbox, but I do not want the user to be able to edit any of the information in it. I basically want the entire box to be disabled except for the ability to scroll... I just want to display the info, I did some searching for this but haven't found any clear answers. Links are always appreciated!!

    Thank you good people

  2. #2
    ohmydatabase's Avatar
    ohmydatabase is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    Feb 2017
    Posts
    79
    Update:
    I have changed some properties. Setting Enabled = True, and Locked = True got me a little closer to my desired behavior. Locked essentially disabled all the keys so the user cant 'edit' what is in this textbox. Now I just need to make it so when initially set the value of the textbox it doesn't select all the text upon display. I'm going to investigate the use of SendKeys or something similar to deselect the text.

    Also it seems to be another popular problem to enable the scroll wheel on the mouse. (There is no event in the textbox properties to trigger when the mouse wheel moves in Office 2007)

  3. #3
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,973
    One way of preventing the text being highlighted is to set the focus to anther control

  4. #4
    ohmydatabase's Avatar
    ohmydatabase is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    Feb 2017
    Posts
    79
    @ridders52

    Worked beautifully. Thank you.

  5. #5
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,973
    You're welcome.

    This is a general point rather than directed at you.
    basing a user description on the number of posts seems dumb to me
    It makes it tricky knowing whether to write a short response as I did for you or give full details.

    Someone who has written thousands of posts may or may not be an expert.
    Similar just because someone else has written very few doesn't mean they are necessarily a novice.

    For now at least, I am not allowed to change my status
    Maybe that will change if I post lots here but my activity is mainly on a different forum - AWF

    OK rant over. Sorry about that!

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

Similar Threads

  1. Looking for Scrollbar in text box example
    By Middlemarch in forum Access
    Replies: 6
    Last Post: 10-26-2015, 05:29 PM
  2. Missing Vertical Scrollbar
    By JeffChr in forum Forms
    Replies: 2
    Last Post: 11-21-2014, 07:54 AM
  3. Replies: 4
    Last Post: 05-17-2013, 02:38 AM
  4. Vertical scrollbar in reports
    By Cedarguy in forum Reports
    Replies: 2
    Last Post: 11-07-2012, 03:15 PM
  5. Behavior of the "Enter" key on textbox
    By Grooz13 in forum Forms
    Replies: 1
    Last Post: 01-13-2011, 03:00 PM

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