Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Capture Active Page Name of a TabControl

Status
Not open for further replies.

jmgibson

Technical User
Oct 1, 2002
81
0
0
US
Is there a way to capture the Active Tab Name on a Tab Control. My VB is rusty, but I want to do something like.

varActiveTabName = me.TabControlName.Name

Ultimately, I want to use the variable in a query so that when a Tab is Clicked, the query will re-run based on the new tab name.

Select * from tblClasses where Category = varActiveTabName

Any Thoughts?
 
the value of the tabctl is the index of the selected page. So

Private Sub TabCtl0_Change()
dim activeTabName as string
activeTabName = Me.TabCtl0.Pages(Me.TabCtl0.Value).Name
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top