Detect tab id

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
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top