Yes, I am trying to trigger on certain tabs, because I want to trigger different events when I click on certain tabs.
The onchange event I am using just uses the Case 0, Case 1 etc... to see which tab I pressed and is working OK, but would just like to be able to put code under each individual tab to keep it straighter in my head.
I appreciate your help
I may end up just staying with the onchange event but just can't figure why each tab wont trigger an event specific to that tab, it may not supposed to, but I would think it would. ??
Both the Tab Control and each Page within in it do in fact have individual OnClick events which serve the purpose they were initially designed for.
Each Page within the Tab Control's Page Collection contains the OnClick event but the event is global to the entire page only, as is the same with typical Forms. You have to consider each Page as a individual Form which you place Controls onto.
The Tab Control's OnClick event is global to the entire Control....it to must be considered as a Form since controls can be placed onto it that are global to all Pages, not just individual Pages.
In essence, when you place a Tab Control on a Form, what you are getting are a bunch of Forms in a Form on a Form (so to speak)
The OnChange event is in place to serve exactly for what it is named. To fire when a Tab selection (or Focus) is Changed.
The issue of using the OnClick event for each Page when the Page is in fact selected is a minor one and you can work around this by simply Calling the event from the Tab Control's OnChange event. For example:
Private Sub TabCtl0_Change()
Select Case Me.TabCtl0.Value + 1
If you actually use the Tab Control later on to any real extent, you may find that firing the Page OnClick event when a Page selection is made, may in fact provide an undesirable effect.
I would recommend you play your cards with the Tab Control's OnChange event and structure your code so that it wont be so confusing to you.
Self Taught In ALL Environments.....And It Shows!
That makes sense. I had to read it a couple of times for it to sink in, but that makes sense.
And I am already using the onchange event, and thanks to you as a matter of fact, because I read one of your posts last year on the subject and found it very useful. I have read many of your posts and have learned a lot from them, Thank You for helping...