Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / February 2006

Tip: Looking for answers? Try searching our database.

referring to a particular tab on a tab control

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steve - 11 Feb 2006 15:11 GMT
I have a tabControl on frmForm. When the user selects a particular tab (e.g.
Tab2) I would like to run a procedure. I can activate a procedure when the
user clicks on the tab control using: private sub TabControl_Change(). But
how do I evaluate which tab was selected (for example)
private sub TabControl_Change()
     if me.TabControl = "Tab2" Then
     Beep
     End if
End Sub
I tried this but it doesn't work. Any help would be appreciated. Thanks.
Douglas J. Steele - 11 Feb 2006 15:35 GMT
What you're calling "Tab2" is actually the name of a Page object in the Tab
control's Pages collection.

The Tab control's Value property tells you what page is current.

What you likely want, then, is:

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)

>I have a tabControl on frmForm. When the user selects a particular tab
>(e.g.
[quoted text clipped - 7 lines]
> End Sub
> I tried this but it doesn't work. Any help would be appreciated. Thanks.
Douglas J. Steele - 11 Feb 2006 15:36 GMT
Sorry about that: hit Enter too soon!

What you're calling "Tab2" is actually the name of a Page object in the Tab
control's Pages collection.

The Tab control's Value property tells you what page is current.

What you likely want, then, is:

If Me.TabControl.Pages(Me.TabControl.Value).Name = "Tab2" Then

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)

>I have a tabControl on frmForm. When the user selects a particular tab
>(e.g.
[quoted text clipped - 7 lines]
> End Sub
> I tried this but it doesn't work. Any help would be appreciated. Thanks.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.