Hi,
I am struggling with a cascading combo box problem. I have a combo box cbo_county - when I select a county from this combo box I would like to have the fields in two other combo boxes (cbo_project and cbo_map_file)
updated with fields only from the selected county.
The cbo_project combo box is based on a table (Projects) with the following fields: project_ID, project_name, county.
The cbo_map_file combo box is based on a table (Map File) with the following fields: Map File, County
I have no problem making it work with just one of the combo boxes, just like a regular cascading combo box, my trouble is getting both combo boxes to update at the same time. How can I accomplish this?
Currently, in order to have it work with one combo box I have it set up with the following code on the After Update event of the cbo_county combo box:
Private Sub cbo_county_AfterUpdate()
cbo_project.RowSource = "Select Projects.project_name " & _
"FROM Projects " & _
"WHERE Projects.County = '" & cbo_county.Value & "' " & _
"ORDER BY Projects.project_name;"
End Sub
Thanks in advance for any suggestions!
I am struggling with a cascading combo box problem. I have a combo box cbo_county - when I select a county from this combo box I would like to have the fields in two other combo boxes (cbo_project and cbo_map_file)
updated with fields only from the selected county.
The cbo_project combo box is based on a table (Projects) with the following fields: project_ID, project_name, county.
The cbo_map_file combo box is based on a table (Map File) with the following fields: Map File, County
I have no problem making it work with just one of the combo boxes, just like a regular cascading combo box, my trouble is getting both combo boxes to update at the same time. How can I accomplish this?
Currently, in order to have it work with one combo box I have it set up with the following code on the After Update event of the cbo_county combo box:
Private Sub cbo_county_AfterUpdate()
cbo_project.RowSource = "Select Projects.project_name " & _
"FROM Projects " & _
"WHERE Projects.County = '" & cbo_county.Value & "' " & _
"ORDER BY Projects.project_name;"
End Sub
Thanks in advance for any suggestions!