Changing subforms

  • Thread starter Thread starter rony
  • Start date Start date
R

rony

Hello all.

I have a form and a few potential subforms. The user selects the subform he
wants from a combobox, and the space reserved for the subform then displays
the subform required from a collection of available forms. Can this be
done?

Many thanks

Rony.
 
Rony

So, you're thinking to "stack" multiple subforms, make them invisible, and
make the one selected visible? Consider another potential approach -- use a
single subform and change its source, based on the combo box selection.
Your post didn't mention whether the multiple subforms all had the same
number of fields...
 
Yes.

You can set the SourceObject of the subform control to the name of the form
you wish to load, and then set the LinkMasterFields and LinkChildFields
properties.
 
Thanks

What a surprise. I thought my post did not get posted.

I was not thinking of 'stacking' multipe subforms, but I suppose, by
definition, a subform must first be loaded onto a form to be called a
'subform'. I would prefer *not* to do the stacking, but to keep a
'reservoir' of datagrid forms for me to use, and then load onto the main
form as needed.

The multiple subforms do not have the same number of fields.

Many thanks for your input.

Rony
 
Thanks, I thought my original post never got posted.

I would rather not "stack" multiple subforms onto the main form, but I
suppose that by definition, a subform must first appear on the form to be
called a subform.

I would prefer to have a reservoir of potential (not yet sub) forms to chose
from (all datagrid type), and then call the one I need and place on the
subform, as and when required. Is this possible? Is it possible to 'plant'
a subform 'on the fly'?

The subforms have different number of fields, unfortunately.

Many thanks.

Rony
 
Thanks, I will try this.

Allen Browne said:
Yes.

You can set the SourceObject of the subform control to the name of the form
you wish to load, and then set the LinkMasterFields and LinkChildFields
properties.
 
Back
Top