J
Jenny
I have 2 combo boxes on a form, cbostate and cbocounty. I want the cbocounty
combo to list only counties in the state chosen in the first combo box. Here
is what I have, but the cbocounty combo box doesn't update and display any
counties.
I have a table of unique State and county combinations called tblCounty-ST.
The row source for cbostate is...
SELECT DISTINCT [tblCounty-ST].ST FROM [tblCounty-ST] ORDER BY
[tblCounty-ST].ST;
The after update event code is...
rivate Sub cbostate_AfterUpdate()
On Error Resume Next
cbocounty.RowSource = "Select tblCounty-ST.Cty " & _
"FROM tblCounty-ST " & _
"WHERE tblCounty-ST.ST = '" & cbostate.Value & "' " & _
"ORDER BY tblCountry-ST.Cty;"
End Sub
my row source for cbocounty is blank.
thanks in advance
combo to list only counties in the state chosen in the first combo box. Here
is what I have, but the cbocounty combo box doesn't update and display any
counties.
I have a table of unique State and county combinations called tblCounty-ST.
The row source for cbostate is...
SELECT DISTINCT [tblCounty-ST].ST FROM [tblCounty-ST] ORDER BY
[tblCounty-ST].ST;
The after update event code is...
rivate Sub cbostate_AfterUpdate()
On Error Resume Next
cbocounty.RowSource = "Select tblCounty-ST.Cty " & _
"FROM tblCounty-ST " & _
"WHERE tblCounty-ST.ST = '" & cbostate.Value & "' " & _
"ORDER BY tblCountry-ST.Cty;"
End Sub
my row source for cbocounty is blank.
thanks in advance