unloading and loading subform

  • Thread starter Thread starter dave
  • Start date Start date
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
 
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
 
Back
Top