G
Guest
When the user changes tabs in a form I want the On Change Event to make
particular controls on the main form visible.
I tried:
Private Sub TabMainTab_Change()
Forms!frmStartUp!txtManual.Visible = Me.ActiveControl = "tabCurrentManual"
End Sub
Nope. I then tried a flurry of alternatives:
= Me.Page = "tabCurrentManual"
= Me.Page = 1
= Me.Pages.Index = 1
= Me.TabMainTab.Pages(1)
and a whole bunch of nonsense related to Screen and ActiveControl.
I'm pretty comfortable with "Forms!frmStartUp!txtManual.Visible =" because I
know it works. Where I am lost is in referring to the actual tab control.
If the Tab Index is 1 and the tab name is "tabCurrentManual" and the related
subform is "frmCurrentManual" I want particular fields to be visible. If,
however, the Tab Index is 2 and the tab name is "tabCurrentHolder" and the
related subform is "frmCurrentHolder" I want different fields to be visible
instead. With this many possible criteria to choose from, how can I possibly
go wrong?
It's like I'm playing battleship, and I'm hitting all around the right
syntax without actually scoring.
particular controls on the main form visible.
I tried:
Private Sub TabMainTab_Change()
Forms!frmStartUp!txtManual.Visible = Me.ActiveControl = "tabCurrentManual"
End Sub
Nope. I then tried a flurry of alternatives:
= Me.Page = "tabCurrentManual"
= Me.Page = 1
= Me.Pages.Index = 1
= Me.TabMainTab.Pages(1)
and a whole bunch of nonsense related to Screen and ActiveControl.
I'm pretty comfortable with "Forms!frmStartUp!txtManual.Visible =" because I
know it works. Where I am lost is in referring to the actual tab control.
If the Tab Index is 1 and the tab name is "tabCurrentManual" and the related
subform is "frmCurrentManual" I want particular fields to be visible. If,
however, the Tab Index is 2 and the tab name is "tabCurrentHolder" and the
related subform is "frmCurrentHolder" I want different fields to be visible
instead. With this many possible criteria to choose from, how can I possibly
go wrong?
It's like I'm playing battleship, and I'm hitting all around the right
syntax without actually scoring.