The following snipet of code is from the second tier of 3 cascading combo boxes.
Id like to know if there is a way to use a wildcard instead of typing each Case senerio.
Example: Instead of listing each case "No Power", "No Display", "Error 1" for Electrical problems. I would add a prefix ("E-")to the items in their table ( "E-No Power", "E-No Display", "E-Error 1".....)
Then use one line of code like:
'Direct all Cases that start with "E-" to the table "tblElectricalDetail"
***************************************************
Select Case cboProbLevel1.Value
Case "E-*"
cboProbLevel2.RowSource = "tblElectricalDetail"
********************************************************
I was not sucessful getting the above to work.
' Current code snipet
Thanks
--Dave
Id like to know if there is a way to use a wildcard instead of typing each Case senerio.
Example: Instead of listing each case "No Power", "No Display", "Error 1" for Electrical problems. I would add a prefix ("E-")to the items in their table ( "E-No Power", "E-No Display", "E-Error 1".....)
Then use one line of code like:
'Direct all Cases that start with "E-" to the table "tblElectricalDetail"
***************************************************
Select Case cboProbLevel1.Value
Case "E-*"
cboProbLevel2.RowSource = "tblElectricalDetail"
********************************************************
I was not sucessful getting the above to work.
' Current code snipet
Code:
Private Sub cboProbLevel1_AfterUpdate()
On Error Resume Next
Select Case cboProbLevel1.Value
Case "No Power"
cboProbLevel2.RowSource = "tblElectricalDetail"
Case "No Display"
cboProbLevel2.RowSource = "tblElectricalDetail"
Case "Error 1"
cboProbLevel2.RowSource = "tblElectricalDetail"
Case "Latch"
cboProbLevel2.RowSource = "tblMechanicalDetail"
End Select
End Sub
Thanks
--Dave