Results 1 to 7 of 7
  1. #1
    Salty Mariner is online now Intermediate
    Windows 11 Access 2021
    Join Date
    Dec 2023
    Location
    Corpus Christi, TX
    Posts
    69

    Tab Control Forecolor chnages when hiding a tab

    Here is a strange behavior....I have a tab control that changes the fore color when I hide a tab. It reverts to the Hover fore color (white) and even trying to set the forecolor in code back to a dark gray does not seem to help. I'm stumped I did a search on this and it is an issue that others have apparently encountered. No solutions that I have been able to find. Sounds like a bug in the tab control.

    My workaround for now is to use black for a hover fore color and a light hover color. It works but doesn't match my other forms that use tab controls.

    Any thoughts or workarounds?
    Last edited by Salty Mariner; 01-08-2024 at 09:33 PM. Reason: Typos

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I am not following. I have a tab control where I hide tabs and don't notice changes in color. Still using Access 2010.

    Post your code or your db.
    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
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,654
    Is it just one Tab control or all of them?
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  4. #4
    Salty Mariner is online now Intermediate
    Windows 11 Access 2021
    Join Date
    Dec 2023
    Location
    Corpus Christi, TX
    Posts
    69
    Quote Originally Posted by June7 View Post
    I am not following. I have a tab control where I hide tabs and don't notice changes in color. Still using Access 2010.

    Post your code or your db.
    June, here is the code. It's pretty innocuous and simple. Note, that it was doing this before I added the last 3 lines to the 2nd If statement. In a nutshell it's just "Me.Folder_Path.Visible = False".

    Code:
    Private Sub tabCrew_Change()
        If Me.TabCrew.Value = 6 Then Exit Sub
        
        If Me.Folder_Path.Visible = True Then
            Me.Folder_Path.Visible = False
            Me.lblMaintenance.ForeColor = RGB(166, 166, 166)
            Me.cmdEditFolderPath.BackColor = RGB(166, 166, 166)
            Me.cmdEditFolderPath.Enabled = False
        End If
    End Sub

  5. #5
    Salty Mariner is online now Intermediate
    Windows 11 Access 2021
    Join Date
    Dec 2023
    Location
    Corpus Christi, TX
    Posts
    69
    Hi Moke,

    It's all of the tabs on one control, and I can't change them back in code either. I have not yet tried duplicating this behavior on other tab controls

    It's weird because in searching this online I'm apparently not the only one who has seen this behavior. Unfortunately I have also not seen any solutions posted either.

    I have a workaround for now so this is by no means a deal breaker. It's just odd, aggravating behavior.

  6. #6
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,654
    It's all of the tabs on one control, and I can't change them back in code either. I have not yet tried duplicating this behavior on other tab controls
    I meant on other tab controls, not the individual pages of the control. I'd suggest re-building the control just to be sure.
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  7. #7
    Edgar is offline Competent Performer
    Windows 8 Access 2016
    Join Date
    Dec 2022
    Posts
    274
    I've solved this buggy behavior in the past by loading the required colors and other settings in the on_load event of the form. It has happened to me with controls that use the "theme" property, like buttons, the tab control and maybe other controls.
    Please click on the ⭐ below if this post helped you.


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

Similar Threads

  1. Replies: 11
    Last Post: 12-13-2021, 05:14 PM
  2. Changing Forecolor on form
    By dvgef2 in forum Forms
    Replies: 7
    Last Post: 08-22-2015, 01:19 PM
  3. hiding a control box
    By markjkubicki in forum Programming
    Replies: 4
    Last Post: 07-09-2015, 12:42 PM
  4. Label.Forecolor
    By SSgtBarry in forum Access
    Replies: 5
    Last Post: 08-21-2014, 03:59 PM
  5. Replies: 3
    Last Post: 06-25-2013, 02:08 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