I hope this is an easy question for someone out there. In Access 2000…I have a MainForm with a tab control (MAIN TABS) with 7 tabs.
Within each tab is a SubForm.
Within each SubForm is a tab control (TabCtl0) with 2-6 tabs.
Within each TabCtl0, each tab contains a SubSubForm.
Each record in the MainForm has an ID Number; the SubForms are bound to that ID Number, and the SubSubForms are bound to that ID Number in the SubForms.
In order to speed up opening of the MainForm, I’ve set the record sources for the SubSubForms on the “On Change” event of TabCtl0 in each SubForm.
The problem is that if a user switches to another record in the MainForm while the focus is on one of the SubSubForms that has a record source dependent on a ‘change’ in the tab control, the data for the new record doesn’t show. The user has to click to a different tab, then back to the original one.
I’d like to solve the problem by setting the focus on the first tab when the record changes. (The first tab in each TabCtl0 has a set record source, so its data will update automatically with a new record selection). I found ADezii's How-to article about setting the focus in a tab control. My problem is where to put this SetFocus code – what ‘event’ would it belong to?
Angi