I have a Select All check box on one of my databases. It currently runs an update query that selects or unselects all of the records in a subform. I now have two subforms on separate tabs in a tab control. I would like to be able to have the Select All checkbox know which tab is visible and do the selecting/unselecting on just that form. I initially thought I would test for which tab had the focus, but I immediately realized that once I click on the Select All checkbox, no tab has focus. Is there a way to test which tab is active/visible?
How do I test for which tab is active in VBA?
Collapse
X
-
Tags: None
-
So I could do something like:
Code:If Me.tabControlName = "Devices_tab" Then 'the name of one of my tabs 'Do something Else 'Do something else End IfComment
-
Comment
-
Sorry. My bad. It's the TabControl you're printing rather than the Page itself. The TabControl has a default property called .Value which reflects which of its Pages is currently selected. Much like a Frame returns a value representing which of the Options within it is currently selected.Comment
Comment