Multiform coding problem

B

Brad

I believe that I'm close but can't seem to get it right.

What I want to do is to control the visibility of ComboBox's and Labels on
Multiforms. Am I close? cmbEDU is the name of the first ComboBox on the
Multiform. I'm not sure if I need to note that this code is not on the
Multiform itself.


Private Sub cmbProdSeries_Change()
cmbProduct.RowSource = ""
cmbProduct.Text = ""
Select Case cmbProdSeries.Text
Case Is = "Experience Life"
cmbProduct.RowSource = "inpELProducts"
lblCDate.Caption = "Contract Effective Date"
cmbClass.RowSource = "inpStatusLbD"
MultiPage1.Pages("Page1").Item(cmdEDU).Visible = False
' MultiPage1.Pages("Page1").Item(lblEDU).Visible = False
Case Is = "Life by Design"
cmbProduct.RowSource = "inpLbDproducts"
lblCDate.Caption = "Contract Application Date"
cmbClass.RowSource = "inpStatusLbD"
MultiPage1.Pages("Page1").Item(cmdEDU).Visible = True
' MultiPage1.Pages("Page1").Item(lblEDU).Visible = True

Case Is = "New Series"
cmbProduct.RowSource = "inpNEWproducts"
lblCDate.Caption = "Contract Application Date"
cmbClass.RowSource = "inpStatusLbD"
MultiPage1.Pages("Page1").Item(cmdEDU).Visible = True
' MultiPage1.Pages("Page1").Item(lblEDU).Visible = True
End Select

End Sub
 
B

Brad

Got it!!! Can this be simplified???

Private Sub cmbProdSeries_Change()
cmbProduct.RowSource = ""
cmbProduct.Text = ""
Select Case cmbProdSeries.Text
Case Is = "Experience Life"
cmbProduct.RowSource = "inpELProducts"
lblCDate.Caption = "Contract Effective Date"
cmbClass.RowSource = "inpStatusLbD"
MultiPage1.Pages("Page1").Item("cmbEDU").Visible = False
MultiPage1.Pages("Page1").Item("lblEDU").Visible = False
Case Is = "Life by Design"
cmbProduct.RowSource = "inpLbDproducts"
lblCDate.Caption = "Contract Application Date"
cmbClass.RowSource = "inpStatusLbD"
MultiPage1.Pages("Page1").Item("cmbEDU").Visible = True
MultiPage1.Pages("Page1").Item("lblEDU").Visible = True

Case Is = "New Series"
cmbProduct.RowSource = "inpNEWproducts"
lblCDate.Caption = "Contract Application Date"
cmbClass.RowSource = "inpStatusLbD"
MultiPage1.Pages("Page1").Item("cmbEDU").Visible = True
MultiPage1.Pages("Page1").Item("lblEDU").Visible = True
End Select

End Sub
 

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

Similar Threads


Top