I agree with Paul; Cascading Comboboxes are intended to be used when a given selection, in the first Combobox, will generate multiple, possible selections, in the second Combobox.
If the original selection is only going to generate a single, possible item, using a single Combobox, in the manner that his code demonstrates, is the way to go.
FYI, the problem with the code you were given at the above site
Code:
Private Sub cboCountry_AfterUpdate()
On Error Resume Next
cboCity.RowSource = "Select tblAll.City " & _
"FROM tblAll " & _
"WHERE tblAll.Country = '" & cboCountry.Value & "' " & _
"ORDER BY tblAll.City;"
End Sub
is that it doesn’t reset the second Combobox so that a previous selection, if any, doesn't remain showing. Adding a single line
Code:
Private Sub cboCountry_AfterUpdate()
On Error Resume Next
cboCity.RowSource = "Select tblAll.City " & _
"FROM tblAll " & _
"WHERE tblAll.Country = '" & cboCountry.Value & "' " & _
"ORDER BY tblAll.City;"
cboCities = ""
End Sub
would have taken care of that, and is usually standard. BTW, that site usually gives excellent advice/examples, and I'm sure that this was simply an oversight on their part!
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007