Detect tab id

  • Thread starter Thread starter SF
  • Start date Start date
S

SF

Hi,

I have a form with 4 Tabs. Each Tab has a subform, each subform has an ID
field to link to the main form. I want to refresh a subform when a the
cursor is on that specific tab, but I don;'t know how to refer to a Tab
index.

For example
If cursor is on Tab 2 then
frmSubForm2.requery
end if

Could someone help me

SF
 
You can get the name of the tab by using:

Me.TabCtl1.Pages.Item(Me.TabCtl1.Value).Name

Or just the Index number:

Me.TabCtl1.value
--
Bob Larson
Access World Forums Super Moderator
Utter Access VIP
Tutorials at http://www.btabdevelopment.com
__________________________________
If my post was helpful to you, please rate the post.
 
Back
Top