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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

which page of tab control

Status
Not open for further replies.

dixxy12

Technical User
Jun 18, 2007
45
CA
Hi,

I am trying to find out which page of a tab control has the focus, and can not seem to get it.

i am trying 'formName.value=?' or 'formName.value=?'...trying all sort of things and not getting it.

How cna i find out this info?

Thanks,
 
the value of the tab control is the index (0 to number of tabs-1) of the page
example: to check for 1st page
if me.tabYourTab.value = 0 then ...
 
This is what i have for code in the 'current' and 'onclick' events, and neither one works...
Code:
 If Me.frmTabs.Value = 1 Then
    Me.cmdAddToPO.Visible = False
    MsgBox "page48"
    End If
 
dixxy12 . . .

[ol][li]Be sure of the tab control [blue]name[/blue].[/li]
[li]I could be wrong, but you have . . .
Code:
[blue]    MsgBox "page48"[/blue]
. . . which is indicitive of 49 tabs ([blue]don't forget tab index starts at zero[/blue]). If this is true you should have:
Code:
[blue] If Me.frmTabs.Value = [COLOR=black yellow]48[/color] Then[/blue]
[/li][/ol]
[blue]Your Thoughts? . . .[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Code:
Private Sub TabCtl0_Change()
    MsgBox (Me.TabCtl0.Value)
End Sub

________________________________________________________
Zameer Abdulla
Help to find Missing people
 
thanks guys,

you were right...it's in the 'tab form name' that i was getting mixed up with.

thanks for the help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top