I have a form with 3 cascading combo boxes
cboProblemMain
cboProbLevel1
cboProbLevel2
It works fine unless the user decides to go back and change the cboProblemMain or cboProbLevel1 after initial input. Then they are out of sync. Is there anything I can add to my code that will refresh to a blank field or force the user to revisit the out of sync fields?
Thanks
--Dave
cboProblemMain
cboProbLevel1
cboProbLevel2
It works fine unless the user decides to go back and change the cboProblemMain or cboProbLevel1 after initial input. Then they are out of sync. Is there anything I can add to my code that will refresh to a blank field or force the user to revisit the out of sync fields?
Thanks
--Dave
Code:
Private Sub cboProblemMain_AfterUpdate()
On Error Resume Next
Select Case cboProblemMain.Value
Case "Electrical"
cboProbLevel1.RowSource = "tblElectrical"
Case "Mechanical"
cboProbLevel1.RowSource = "tblMechanical"
Case "Documentation"
cboProbLevel1.RowSource = "tblDocumentation"
End Select
End Sub
Private Sub cboProbLevel1_AfterUpdate()
On Error Resume Next
Select Case Left(cboProbLevel1.Value, 2)
Case "E-"
cboProbLevel2.RowSource = "tblElectricalDetail"
Case "M-"
cboProbLevel2.RowSource = "tblMechanicalDetail"
Case "D-"
cboProbLevel2.RowSource = "tblDocumentationDetail"
End Select
End Sub