Cascading combo boxes

brothertse2008

Registered User.
Local time
Today, 22:32
Joined
Mar 6, 2009
Messages
29
Ive got 3 bound combo boxes on my form. I have managed to get the 1st and 2nd combo box to work but i cant get the 3rd one.

box 1 is simply a dropdown menu with 2 options so no coding requried.
box 2 I have the following code which works fine :

Code:
Private Sub fault_type_detail_1_AfterUpdate()
On Error Resume Next
Select Case fault_type_detail_1.Value
Case "hardware"
    fault_type.RowSource = "tbl_fault_type_detail_1_hardware"
    
Case "software"
    fault_type.RowSource = "tbl_fault_type_detail_1_software"
    
    End Select
    
End Sub

Now in my 3rd combo box I have used the following which doesnt work :

Code:
Private Sub fault_type_detail_2_AfterUpdate()
On Error Resume Next

Select Case fault_type_detail_2.Value

Case "whiteboard"
    fault_type.RowSource = "tbl_fault_type_detail_2_hardware_whiteboard"
    
Case "scanner"
    fault_type.RowSource = "tbl_fault_type_detail_2_hardware_scanner"
Case "keyboard"
    fault_type.RowSource = "tbl_fault_type_detail_2_hardware_keyboard"
Case "other"
    fault_type.RowSource = "tbl_fault_type_detail_2_hardware_other"
Case "printer"
    fault_type.RowSource = "tbl_fault_type_detail_2_hardware_printer"
Case "photocopier"
    fault_type.RowSource = "tbl_fault_type_detail_2_hardware_photocopier"
Case "baseunit"
    fault_type.RowSource = "tbl_fault_type_detail_2_hardware_baseunit"
Case "mouse"
    fault_type.RowSource = "tbl_fault_type_detail_2_hardware_mouse"

    
    End Select
End Sub

this coding is in the "after update" on the relevant controls
 
Good Morning:
Increase your chance of getting assistance: Describe the symptoms of the problem. Why do you believe, "it doesn't work?" :confused:
Do you get an error? Do you get a wrong result? ;)
Cheers,
 
the 1st and 2nd box works fine. The 3rd box however displays nothing when clicking on it. Nothing at all. No error messages either
 
It seems unusual in a cascade that two of the combos modify the rowsource of the same object 'fault_type'.
box 1 is simply a dropdown menu with 2 options so no coding requried.
So what happens when the user makes a selection in box 1?
 
In box 1 the user can select either "hardware" or "software". This information is taken from a dropdown menu in a table
in box 2, the user can see options displayed depending on what option was selected from box 1. That all works fine.
 

Users who are viewing this thread

Back
Top Bottom