I have two combo boxes Country and Region.
I am using the following code to create the list for the second (Region) combo box:
Private Sub Country_AfterUpdate()
Dim strCountry As String
Dim S As String
strCountry = Nz(Me.Country.Value, "")
MsgBox strCountry
S = "SELECT DISTINCT Region from BirdsWorld WHERE Country = '" & strCountry & "'"
Me.Region.RowSource = S
End Sub
When I import the required objects in a new database, it works fine. I also displays the selected country in the MsgBox. When I create another form with cascaded combo boxes in the database, it stops working and does not even display the MsgBox.