The subform should have Enter and Exit events. It also contains load and
open events, but these are only visible when you are actually designing the
form that will become a subfom.
When I use a tab control that contains multiple subforms, I generally only
leave the source object for all the tabs except the first one blank at design
time, then, in the tab controls change event, I check to see what tab the
user has selected (compare the value of the tab control to the page indices
of each of the tabs) and if the source object for the subform on that tab is
still blank, I fill it in.
HTH

Signature
Email address is not valid.
Please reply to newsgroup only.
> I have a subform control that I switch between one of several forms based on
> the state of the database record. More specifically, the subform shows a
[quoted text clipped - 8 lines]
>
> Maury
Maury Markowitz - 31 May 2007 18:04 GMT
> When I use a tab control that contains multiple subforms, I generally only
> leave the source object for all the tabs except the first one blank at design
> time, then, in the tab controls change event, I check to see what tab the
> user has selected (compare the value of the tab control to the page indices
> of each of the tabs) and if the source object for the subform on that tab is
> still blank, I fill it in.
Ok, I'll give this a whirl. Thanks!
Maury
Subforms are loaded before the main form, so that
doesn't help any (this is why it is a good idea to leave
your subform controls empty until you need them).
If you have them on different tabs, you should be
looking at the tab events.
(david)
> I have a subform control that I switch between one of several forms based on
> the state of the database record. More specifically, the subform shows a
[quoted text clipped - 8 lines]
>
> Maury