unloading and loading subform

D

dave

hello
i have one master form and five subforms..
in master form, i have one combo box to choose which subform u want to load
and display...
first thing i want to unload if any subform is open and then load the new
subform according to value to the combo box.
so at a time, there will only one subform in master form...
can any one suggest how to do ?
thanx
dave
 
M

Marshall Barton

dave said:
i have one master form and five subforms..
in master form, i have one combo box to choose which subform u want to load
and display...
first thing i want to unload if any subform is open and then load the new
subform according to value to the combo box.
so at a time, there will only one subform in master form...
can any one suggest how to do ?


Use a single subform control on the main form. Then just
set the subform control's SourceObject property to the name
of the form specified in the combo box. In the combo box's
AfterUpdate event:

Me.subfromcontrol.SourceObject = Me.combobox
 

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