• Changing Tab Control Colors (Access 97/2k)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Changing Tab Control Colors (Access 97/2k)

    Author
    Topic
    #382685

    I have a request from a customer, that some of you may have addressed in the past. I couldn’t find an answer by searching so am asking. If it has been previously asked and answered, I apologize.
    We have a form that uses a tab control with six “tabs”/pages. The customer would like the tab to change color so they can tell at a glance which tab they are working on.

    Any help is GREATLY appreciated.

    Respecfully,
    Kwvh

    Viewing 1 reply thread
    Author
    Replies
    • #649615

      There was a recent discussion on a similar question where the solution involved applying a colored rectange over the tab, but I didn’t find it in a quick search. The bottom line is it isn’t easy to do – though the precedence associated with a selected tab does make it fairly clear. Unfortunately tabs are always going to be gray, even if you make the tab control transparent. I suspect based on the previous post may hold a clue, but be sure to charge your customer a bunch – otherwise one of our customers may hear about it and want it too. (I found the previous discussion post 214389.)

      • #649661

        Thanks Wendell,

        I found a “low tech” solution that looks promising. A five point red line beneath the text on the tab. Seems to meet the need. I will show them on Monday and see if I can get their blessing.

        Kwvh

        • #649728

          Hi kwvh

          Want to share your (how to) solution to others on the forum?

          Thank,s John

          • #649790

            John asked for my “solution”. Obviously I didn’t do a very good job explaining it. LOL

            The Opportunity:
            My customer(s), like me, are over 40 and therefore “age related visually challenged”. In addition, the resolution of their monitors are not the best in the world. With a good monitor and good eyes, it is not difficult to see which tab is on top, but they have neither great monitor nor good eyes.

            The properties of the labels on the form are set so they change colors when the user is in a field/control. This makes it very easy for the user to determine what field the cursor resides in. This was probably my undoing, as they really like that feature and it works very well in 97. (can’t use it in Access 2k due to screen flash issue that Mark mentions).

            Because it is easy to tell which FIELD they are in, they want be able to tell at a glance what TAB they are on.
            [For the life of me I don’t know why. If they know what field, what difference does it make what tab? But that is another issue. I am here to serve.]

            The Solution: (Remember, I did say it was low tech)
            I put a wide (five point) red horizontal line beneath the text on each of the tabs.

            The forms have a gray background with little or no color on the controls or labels. As they tab through the pages, it is immediately obvious which is the current tab as there is a bright red line at the top “underling” the text on the tab indicating the “active” tab.

            The Results:
            Emailed sample to customer to review, and set up appt for Monday to meet and discuss. Got email back this morning that is exactly what they wanted. So Monday, there is no need to meet, just install. kewl! Sometimes I have a tendency to make things more complicated than necessary.

            Thanks for ALL the help so many have given me these last weeks. This is a great community of folks.

            Ken

            • #649835

              Your simple solution prompted me to think another similar one.
              Put a single line above the tab control and move in it code.

              Private Sub TabCtl0_Change()
              Me!Line5.Left = (Me!TabCtl0.Value) * 700
              End Sub
              
    • #649669

      About the only way to do this, unless you obtain some 3rd-party ActiveX add-in that provides this functionality, is to use bitmaps for each Tab Page’s Picture property, and toggle this property on the Tab Control’s On Change event procedure. See my previous post: Re: Tab Control (AC2K) for one example. Code would look like this:

      Private Sub TabCtl1_Change()

      Dim strPath As String
      strPath = “C:ACCESSICONS”

      With Me
      Select Case .TABCTL1
      Case 0
      .Page1.Picture = strPath & “TAB1_YELLOW.BMP”
      .Page2.Picture = strPath & “TAB2_GREY.BMP”
      Case 1
      .Page1.Picture = strPath & “TAB1_GREY.BMP”
      .Page2.Picture = strPath & “TAB2_YELLOW.BMP”
      End Select
      End With

      End Sub

      Note that when images are “toggled” the screen can sometimes flash slightly; with six tab pages, this effect may be exacerbated somewhat. For simple demonstration of this technique, see attached sample db (A2K format) (see frmTabControl3); you will need to copy the bitmap files in zip file to a folder named “C:AccessIcons” (or modify sub to other location). Also with six tabs it’ll involve a bit of work to create & size all the little bitmaps needed for this sophisticated technique (aka kludge) to work (I originally typed tab captions in Word, applied formatting, captured screen shot, then cropped & manipulated the bitmaps in MS Paint).

      I should note that the tab page’s Caption property normally would make it evident which tab is selected….

      HTH

    Viewing 1 reply thread
    Reply To: Changing Tab Control Colors (Access 97/2k)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: