change subform based on selection on mainform

J

john mcmichael

I am looking to have a different subform appear when I choose options from a
combo box on my main form. Can anyone supply any info that could point me in
the the right direction?

Thanks
 
D

Douglas J. Steele

You'd change the SourceObject property of the subform control on the parent
form. You might also have to change the LinkChildFields and LinkMasterFields
to ensure that the parent form and new subform are linked appropriately.
 
J

Jason Lepack

You can change the source of the subform on the AfterUpdate event of
the combobox, but I wouldn't suggest you do it that way.

I would suggest using a tab control and having a different subform on
each tab. Then instead of choosing the different subform with a
combobox you choose it with the tab control.

Cheers,
Jason Lepack
 
D

Douglas J. Steele

Why? Having multiple subforms on the same form can be much slower, depending
on how long it takes to load each subform.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top