Display 1 of 2 subforms based on combo box value.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form (Customers) which has 2 sub groups (Support and Product) one
over the other. I am hoping to use a combo box (or any other tool) to have
only 1 subgroup displayed depending on the value of the combo box. I am open
to any suggestions to accomplish this task.
TIA
 
In the combobox's AfterUpdate event, put logic like:

If Me.MyComboBox = "Group1" Then
Me.Subform1.Visible = True
Me.Subform2.Visible = False
Else
Me.Subform1.Visible = False
Me.Subform2.Visible = True
End If

If you like, this can be simplified to:

Me.Subform1.Visible = (Me.MyComboBox = "Group1")
Me.Subform2.Visible = (Me.MyComboBox <> "Group1")
 
Thanks for the response.
I phrased my question incorrectly so please let me take one more shot at this:

I have a form (Customers) which has 2 subforms (Support and Product) one
over the other. I am hoping to use a combo box (or any other tool) to have
only 1 subgforms displayed depending on the value of the combo box. I am
open to any suggestions to accomplish this task.

Thanks
 
Back
Top