Using multiple Tabs

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all,

First I'm using access 97. I have two tabs groups. I want to be able to
click on the reports tab and then have the other tabs appear.

Question: I have to click on the page to get the code below to work. Is
there anyway to have it run when I click on the tab itsealf? It appears that
the tab is not clickable.

Private Sub pgReport_Click()
tbRptSel.Visible = True
End Sub
 
Mark-
try using the Change event of the tab control itself rather than an event of
the page.
In the change event procedure, check to see if the value of the tab control
corresponds to the 'reports' tab, and if it does, make the other tabs
visible, like this:

If Me.TabCtl11.Value = 2 Then 'Reports tab
me.TabCtl2.visible=true
else
me.tabCtl2.visible=false
end if

or, just this:

Me.tabCtl2.visible = (me.tabctl1.value=2)

hope this helps
-John
 
Question: I have to click on the page to get the code below to work. Is
there anyway to have it run when I click on the tab itsealf? It appears that
the tab is not clickable.

Private Sub pgReport_Click()
tbRptSel.Visible = True
End Sub

Use the Change event instead of the Click event.

John W. Vinson[MVP]
 
Back
Top