Assuming that the name of the subform control is subForm, and the combo box
(cboWhatSubform) returns the name of the form to be displayed as the
subform.
Me!subForm.SourceObject = Me.cboWhatSubform
Note that it's usually a good idea to reset the LinkMasterFields and
LinkChildFields properties when you change the SourceObject, even if they're
the same as for other subforms.
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.