make subforms visable/invisible based on the value in a combo box on main form

  • Thread starter Thread starter Jason
  • Start date Start date
J

Jason

I have a form "A" which contains a combo box with 2
values, 1 & 2. I also have 2 subforms "B" and "C" on
form "A". When the value in the combo box is a 1, I want
subform "B" to be visible and subform "C" to be
invisible. When the value in the combo box is 2, I want
subform "C" to be visible and subform "B" to be
invisible. Can anyone help me with a way to do this?

Thanks,
Jason
 
I have a form "A" which contains a combo box with 2
values, 1 & 2. I also have 2 subforms "B" and "C" on
form "A". When the value in the combo box is a 1, I want
subform "B" to be visible and subform "C" to be
invisible. When the value in the combo box is 2, I want
subform "C" to be visible and subform "B" to be
invisible. Can anyone help me with a way to do this?

Jason,
try something like this in the afterupdate of the combo box:

Me.sfrmB.Visible = Me.cboCombo = 1
Me.sfrmC.Visible = Not Me.sfrmB.Visible

- Jim
 
Back
Top