Hi all,
I have a combobox on my form called TypeOfBusiness, with fields including Corporation, Education, Industry, Non-Profit. In order to make a second combobox called IndustryClassification appear when Industry is selected from the TypeOfBusiness combobox, I have used the following code:
It works just fine. However, when a user selects both, say, Industry and Education, the IndustryClassification combobox will not appear. Any ideas of what code I can use to ensure the IndustryClassification box will appear regardless if another box is checked in addition to Industry? I am wondering if it has to do with the Column attribute but I'm really not sure what to try at this point.
Thanks in advance for all of your wisdom!
I have a combobox on my form called TypeOfBusiness, with fields including Corporation, Education, Industry, Non-Profit. In order to make a second combobox called IndustryClassification appear when Industry is selected from the TypeOfBusiness combobox, I have used the following code:
Code:
Private Sub Form_Current()
If Me.TypeOfBusiness = "Industry" Then
Me.IndustryClassification.Visible = True
Else
Me.IndustryClassification.Visible = False
End If
End Sub
Private Sub TypeOfBusiness_AfterUpdate()
If Me.TypeOfBusiness.Column(1) = "Industry" Then
Me.IndustryClassification.Visible = True
Me.LabelIndustryClassification.Visible = True
Else
Me.IndustryClassification.Visible = False
End If
End Sub
It works just fine. However, when a user selects both, say, Industry and Education, the IndustryClassification combobox will not appear. Any ideas of what code I can use to ensure the IndustryClassification box will appear regardless if another box is checked in addition to Industry? I am wondering if it has to do with the Column attribute but I'm really not sure what to try at this point.
Thanks in advance for all of your wisdom!