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

    How to Stop something being highlit

    I often get something highlighted (or selected) suggesting it has some significance, which is wrong when, e.g. its just displaying a list
    But I can't get this highlight to go away, unless I click somewhere else. If its a pop up form then on the main form.


    How can I achieve this in my code ? I've tried this


    Code:
      If someCondition = True Then
            DoCmd.OpenForm "frmER", acNormal
            Me.text1.SetFocus
        End If
    But the item in frmER stays highlighted.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,944
    What do you mean by "get something highlighted"? Something must happen to cause this. Exactly what is hightlighted?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Middlemarch is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2015
    Posts
    365
    A row or line of text. It can happen in lots of different controls, in this case it's a listview.
    By highlighted/selected I mean it has a different fore/back color to other rows and moves to each row you click on.
    Usually the first row initially.

  4. #4
    Middlemarch is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2015
    Posts
    365
    I should add there's a hack to get this - a textbox on the same Form (unlike my example in #1) and set focus that
    after it's been hidden, or covered up. In some apps (VB6 I think) you can set it's left to a negative and it becomes invisible.
    I was hoping for a more elegant method. Just suppress it or move to a text box on a different Form.

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,944
    A listview or a listbox?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    Middlemarch is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2015
    Posts
    365
    A listview. But I suspect it's a bridge too far... even if focus moves to an invisible text box, it comes back as soon as you scroll!

  7. #7
    Middlemarch is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2015
    Posts
    365
    I did find a solution, FullRowSelect set False and the first col to a width of 20 with no Header.
    The highlight then is only in the first column which now can't be seen.

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

Similar Threads

  1. cannot tab stop to textbox
    By uoghk in forum Programming
    Replies: 4
    Last Post: 06-28-2022, 03:24 AM
  2. Stop Sub when criteria's are met.
    By HS_1 in forum Programming
    Replies: 15
    Last Post: 04-08-2021, 10:11 PM
  3. automatische stop
    By Foli in forum Access
    Replies: 0
    Last Post: 12-20-2010, 02:24 AM
  4. Replies: 2
    Last Post: 11-29-2009, 12:00 PM
  5. How to stop....
    By swampdonkey in forum Forms
    Replies: 0
    Last Post: 12-04-2006, 01:56 PM

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