M
Mike Busch
I posed the question about tutorials for creating a cascading combo box. I
was directed to a site and now understand the process. Created a table with
the fields suggested from the tutorial.The code is as follows.
Private Sub cboCountry_AfterUpdate()
On Error Resume Next
' Synchronise country combo with existing city
cboCountry = DLookup("[Country]", "tblAll",
"[City]='" & cboCity.Value & "'")
' Synchronise city combo with existing city
cboCity.RowSource = "Select tblAll.City " & _
"FROM tblAll " & _
"WHERE tblAll.Country = '" & cboCountry.Value & "' " & _
"ORDER BY tblAll.City;"
End Sub
I need to not have duplicated city's come up per the county. Is there some
code within the present code to make all the selections of the city's unique.
Thank you in advance.
was directed to a site and now understand the process. Created a table with
the fields suggested from the tutorial.The code is as follows.
Private Sub cboCountry_AfterUpdate()
On Error Resume Next
' Synchronise country combo with existing city
cboCountry = DLookup("[Country]", "tblAll",
"[City]='" & cboCity.Value & "'")
' Synchronise city combo with existing city
cboCity.RowSource = "Select tblAll.City " & _
"FROM tblAll " & _
"WHERE tblAll.Country = '" & cboCountry.Value & "' " & _
"ORDER BY tblAll.City;"
End Sub
I need to not have duplicated city's come up per the county. Is there some
code within the present code to make all the selections of the city's unique.
Thank you in advance.