D
dudyone
Have Main form with combo box and other info
I have a combo box with the selections of
Charpy Base
CharpyHAZ
Charpy Weld
Tensile Base
Tensile Weld
Chemical Base
Chemical Mill
Chemical Weld
Bends Weld
I have put the following code in the AfterUpdate of combo box.
All nine subforms are stacked on Tab Control under the first Tab named
Testing
My subform also have tabs named Customer, Specs, MTR Statements that are not
tied to the combo box.
All nine subforms Visible is set to no
When I open the main form everything looks good the tab control shows
my Customer tab, Specs tab, and MTR Statements tab.
When I chose one of the selections in combo box nothing happens.
I want the appropriate subform to open for data.
Whats wrong with the code
Private Sub Cmb_TestType_AfterUpdate()
Select Case Cmb_TestType
Case Charpy_Base
Me.SubFrm_CharpyBase.Visible = True
Me.SubFrm_CharpyBase.Visible = False
Case Charpy_HAZ
Me.SubFrm_CharpyHAZ.Visible = True
Me.SubFrm_CharpyHAZ.Visible = False
Case Charpy_Weld
Me.SubFrm_CharpyWeld.Visible = True
Me.SubFrm_CharpyWeld.Visible = False
Case Tensile_Base
Me.SubFrm_TensileBase.Visible = True
Me.SubFrm_TensileBase.Visible = False
Case Tensile_Weld
Me.SubFrm_TensileWeld.Visible = True
Me.SubFrm_TensileWeld.Visible = False
Case ChemicaL_Base
Me.SubFrm_ChemicalBase.Visible = True
Me.SubFrm_ChemicalBase.Visible = False
Case Chemical_Mill
Me.SubFrm_ChemicalMill.Visible = True
Me.SubFrm_ChemicalMill.Visible = False
Case Chemical_Weld
Me.SubFrm_ChemicalWeld.Visible = True
Me.SubFrm_ChemicalWeld.Visible = False
Case Bends_Weld
Me.SubFrm_BendsWeld.Visible = True
Me.SubFrm_BendsWeld.Visible = False
End Select
End Sub
I have a combo box with the selections of
Charpy Base
CharpyHAZ
Charpy Weld
Tensile Base
Tensile Weld
Chemical Base
Chemical Mill
Chemical Weld
Bends Weld
I have put the following code in the AfterUpdate of combo box.
All nine subforms are stacked on Tab Control under the first Tab named
Testing
My subform also have tabs named Customer, Specs, MTR Statements that are not
tied to the combo box.
All nine subforms Visible is set to no
When I open the main form everything looks good the tab control shows
my Customer tab, Specs tab, and MTR Statements tab.
When I chose one of the selections in combo box nothing happens.
I want the appropriate subform to open for data.
Whats wrong with the code
Private Sub Cmb_TestType_AfterUpdate()
Select Case Cmb_TestType
Case Charpy_Base
Me.SubFrm_CharpyBase.Visible = True
Me.SubFrm_CharpyBase.Visible = False
Case Charpy_HAZ
Me.SubFrm_CharpyHAZ.Visible = True
Me.SubFrm_CharpyHAZ.Visible = False
Case Charpy_Weld
Me.SubFrm_CharpyWeld.Visible = True
Me.SubFrm_CharpyWeld.Visible = False
Case Tensile_Base
Me.SubFrm_TensileBase.Visible = True
Me.SubFrm_TensileBase.Visible = False
Case Tensile_Weld
Me.SubFrm_TensileWeld.Visible = True
Me.SubFrm_TensileWeld.Visible = False
Case ChemicaL_Base
Me.SubFrm_ChemicalBase.Visible = True
Me.SubFrm_ChemicalBase.Visible = False
Case Chemical_Mill
Me.SubFrm_ChemicalMill.Visible = True
Me.SubFrm_ChemicalMill.Visible = False
Case Chemical_Weld
Me.SubFrm_ChemicalWeld.Visible = True
Me.SubFrm_ChemicalWeld.Visible = False
Case Bends_Weld
Me.SubFrm_BendsWeld.Visible = True
Me.SubFrm_BendsWeld.Visible = False
End Select
End Sub