Hi
This is what I have:

I uses a Contry - States - Cites sample, my tables are Sitios (sites), Categorias (categories) and Subcategorías (subcategories), is the same.
When the user add a new record or edit one existing, firs select the site, the category and the subcategory, then two more fields that are just text.
I already made a for for add sites, then another for add categories, in that I used the code you kindly provide me, and works fine.
In this form is for subcategories, I repeat all code just adjusting the for the last combo.
In the Sites combo the PopulatingDataSourceSettings is: CategoriasPubBO.FillBySitio(System.Int32) FillBySitio is a query to the BO that retrieves all the values in the table. The PopuleteOnFormLoad is on FormLoad
In the event SelectedIndexChanged has this: Me.cboCategoria.Requery()
The Cataegories Combo PopulatingDataSourceSettings is: CategoriasPubBO.FillBySitio(System.Int32) where the query in the BO is:
Public Sub FillBySitio(ByVal Sitio As Integer)'-- LocalsDim loCommand As New SqlCommand()'-- Build the queryloCommand.CommandText =
"SELECT * FROM Categorias_Pub WHERE IdSitio = @IdSitio"'-- Add parameterloCommand.Parameters.Add(
"@IdSitio", SqlDbType.Int)loCommand.Parameters(
"@IdSitio").Value = Sitio'-- Execute commandMe.FillDataTable(loCommand)End SubIn the SelectedIndexChanged has this:
If Me.DetalleSubcategoriasBO.Count > 0 Thene.Parameters(0).Value =
Me.DetalleSubcategoriasBO.IdStioElsee.Parameters(0).Value = 0
End IfThe DetalleSubcategoriasBO is the bussines object for the form.
In the SelectedIndexChanged has this: Me.cboSubcategoria.Requery()
The PopulationDataSourceSettings are: SubCategoriasBO.FillByCategoria(System.Int32) and the PopulateOnFormLoad is in manual (I all rady put this in OnLoad and not works).
Public Sub FillByCategoria(ByVal Sitio As Integer)'-- LocalsDim loCommand As New SqlCommand()'-- Build the queryloCommand.CommandText =
"SELECT * FROM SubCategorias_Pub WHERE IdCategoria = @IdCategoria"'-- Add parameterloCommand.Parameters.Add(
"@IdCategoria", SqlDbType.Int)loCommand.Parameters(
"@IdCategoria").Value = Subcategoria'-- Execute commandMe.FillDataTable(loCommand)End SubThe ListPopulation event is this:
If Me.DetalleSubcategoriasBO.Count > 0 Thene.Parameters(0).Value =
Me.DetalleSubcategoriasBO.IdStioElsee.Parameters(0).Value = 0
End IfFinally the ListPopulating event in the las combo is this:
If Me.DetalleSubcategoriasBO.Count > 0 Thene.Parameters(0).Value =
Me.DetalleSubcategoriasBO.IdCategoriaElsee.Parameters(0).Value = 0
End IfHope it makes sense and you can help me.
Regards

Everything is possible, just keep trying...