Subform on the fly

VBAhole22

Registered User.
Local time
Today, 05:08
Joined
Jan 18, 2002
Messages
117
Is it possible to just put a blank subform inside another form and then based on the selection made in a combobox have that subform be filled in as a specific form. Basically, I have 5 possible forms I would like to put in that subform slot but I only want to show 1 of them based on the user selection.
 
Yes.

Make a sub form, call it "subfrmBlank". This form just has some nice background color and no controls of any kind.

Make some real sub forms. Call them whatever you want.

Make a "main" form. On the main form, place a subform control. Set the Source Object to subfrmBlank.

Now you will have to add some logic to your main form to decide which real subform you want. Say you have an option group for example. Make an After Update event sub for the option group. There you can dynamically change the SourceObject property of the sub from control.

RichM
 

Users who are viewing this thread

Back
Top Bottom