[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 364
  • Last Modified:

Multipage control navigation Easier to follow by changing colors on Tab

access 2010 vba

I have a Multipage control with 8 pages..

Multipage1
Page1 to Page8

What I need:

When I click on a Page...Say  "Page1"
I need the font ot turn "Red" "Bold"

The other Pages will stay
"Black" "Bold"
If i click on Page2 it goes "Red" "Bold"
the other pages go  "Black" "Bold"


etc....




Thanks
fordraiders
0
Fordraiders
Asked:
Fordraiders
  • 3
  • 2
  • 2
1 Solution
 
als315Commented:
In Access 2010 you can play with tab control's properties:
TabTab headers have no separate properties and you can't change them separately. You can try this sample:
http://www.utteraccess.com/forum/Create-tabs-color-t425023.html#Post425023&bodyprev=
but it seems not very useful.
0
 
FordraidersAuthor Commented:
no not useful...
thanks
0
 
IrogSintaCommented:
You can do this by hiding the actual tabs of the Tab control (set Style to NONE) and adding an Option Group of buttons that you arrange horizontally and put above your tab control.  Make the BorderStyle of this group transparent.  Let's give this Option Group the name grpTabs.  In the AfterUpdate event of grpTabs, you would add something similar to this:
Private Sub grpTabs_AfterUpdate()
    Dim ctl As Control
    For Each ctl In Me.grpTabs.Controls
        If ctl.ControlType = acToggleButton Then
            ctl.ForeColor = vbBlack
        End If
    Next
    Me("Toggle" & Me.grpTabs).ForeColor = vbRed
    Me.tabNameOfTabControl.Value = Me.grpTabs - 1
    
End Sub

Open in new window

0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
IrogSintaCommented:
In addition, it's better to set the Tab Style to None in your OnLoad event with:
Me.tabNameOfTabControl.Style = 2
That way you could still easily go to the different pages in design mode.

You can also set the BackStyle of the tab control to Transparent and put a colored box behind it.

Here's a quick one I just made for comparison:
tab controls
0
 
als315Commented:
@Ron: it is almost the same with example from uteraccess site (see link above).
But my example for Access 2010 was exact answer to question:
"When I click on a Page...Say  "Page1"
I need the font ot turn "Red" "Bold"

The other Pages will stay
"Black" "Bold"
If i click on Page2 it goes "Red" "Bold"
the other pages go  "Black" "Bold"
0
 
IrogSintaCommented:
I didn't even check that out, Alex.  I guess I should have first.
0
 
FordraidersAuthor Commented:
Thanks
0

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now