This is a simple one I hope. I have a tab control (tabctl10) on a form with 7 pages. Depending on the page selected I want to display certain controls like txtFromDate and txtToDate. I have tried both the on Change event and the On Click event for the Page. The On Change event runs every time I click a different tab, which is what I want, but I want to write and If Then statement or a Case statement to run different code depending on the page selected. I can't seem to track down this property. This is what I am working with. It doesn't work, but you get the idea.
Code:Private Sub TabCtl0_Change() If Me.TabCtl0.Control.Name = "Page57" Then MsgBox "hello" Me.txtFrom.Visible = True Me.txtTill.Visible = True Else Me.txtFrom.Visible = False Me.txtTill.Visible = False End If End Sub