Subform switching

  • Thread starter Thread starter murchie1
  • Start date Start date
M

murchie1

I'm not sure if anyone can help me, but I basically have a main form
that has a combo box with a list of "shows". I also have a bunch of
other forms that I want to make available (as subforms) to the user on
the main form depending on which "show" they choose.

I've thought that I could just find a way to have them all on the same
main form in the same space and have the Visibility property change
depending on the choice made on the main form.

If there is a better method or if someone knows how I can do the above
idea, I'd be eternally grateful.

Thanks a million
 
Setting the Visible property of each subform will work.

An alternative might to be place just one subform control on the form, and
change its SourceObject

With Me.[Sub1]
Select Case Me.Combo1.Value
Case "Customers"
.SourceObject ="frmCustomer"
Case "Orders"
.SourceObject ="frmOrders"
'etc.
Case Else
MsgBox "Huh?"
End Select
End With
 
Back
Top