Here is a previous post of mine on this subject:
' **********************************************
From: Stephen Lebans (
[email protected])
Subject: Re: Background color on a "tab" form
View: Complete Thread (5 articles)
Original Format
Newsgroups: microsoft.public.access.formscoding
Date: 2002-01-30 16:26:05 PST
Open your form in Design view.
Select the TAB control itself...not one of the individual TAB pages. Enter a
value for the Tab Fixed Height and Width properties.
Now Select each of the individual TAB Pages in turn. Enter a color RGB value
in each Page's TAG property. If you are unfamiliar with RGB color codes
simply enter 255 for now.
You have to take the time to look at the code behind the sample Form. As you
can see from the code below you have to add code to the following
Sections/Events behind your Form/Tab control.
1) The Declarations section at the top of your Form
2) The Form Load and UnLoad events
3) The Tab control Change event.
The only things you have to change are the names of your Tab control and
the Rectangle control used to simulate a color for the Background of the
Tab control.
So in the sample, I named the TAB control "tabCtl" and the Rectangle
control "RecBG".
Just change these names to those of the controls you are using on your
Form.
Me.TabCtl
Me.RecBG
There's nothing else to tell you. If you are not comfortable implementing
this code solution then honestly you simply should not use it.
Good Luck.
' Here's the code behind the sample Form.
Option Compare Database
Option Explicit
' Var of type Tab class
Private TB As clsTabs
Private Sub Form_Load()
'DoCmd.MoveSize 0, 0, 6650, 4800
' Create an instance of our TabColors class
Set TB = New clsTabs
' You MUST set the TabControl prop
TB.TabControl = Me.TabCtl
' You MUST set the BackGround control
' used to display the current pages background color
TB.BGControl = Me.RecBG
' Parent Form
TB.TabForm = Me
' Set the desired Rotation amount
TB.RotateDegree = 90
' Create the Tabs
TB.MakeTabs
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set TB = Nothing
End Sub
' **********************************************
--
HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.