Who has got a good grasp of events on tab controls?
Up to a recent set of tests the tabControl_Click event handling was working perfectly. Now I discover that there is one sequence of events where the click event does not fire up as I expect.
The sequence of events is:
Based on a subform within the main form, I make the tabs visible and show pag0
Me.Parent!tabControl.Visible = True
Me.Parent!tabControl.Pages("pag0").SetFocuspag0 displays a form. I update something. I click the tab for pag1.
The BeforeUpdate event for the form on pag0 kicks in. I send out a MsgBox to confirm that the update is wanted. For safety I set Cancel = False. The update to the table goes through OK.
pag1 displays its forms OK. Everything is fine up till now, but the tabControl_Click event does not get triggered.
If I click the tab for pag1 again, the tabControl_Click event gets triggered OK.
So am I expecting too much for the tab controls to trigger both an update on the old tab and to trigger some code on the new tab?
How do I debug what is going on? I cannot see how I delve into something which isn't happeneing.