Display 1 of 2 subforms based on combo box value.

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
 
D

Douglas J. Steele

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")
 
G

Guest

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
 

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