Combo values based on another combo value


Author
Message
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Juan Carlos,

All you need to understand here is how the relation between the 3 tables works, then in the Combobox.SelectedIndexChanged you have to check the ParentBO.Count > 0, so if there is a record, then you can sent the ParentBO.PKFieldValue to the first parameter e.Parameters(0).Value = Me.ParentBO.PKFieldValue.

In the Categories Combobox SelectedIndexChanged use this code:

If Me.CategoriasPubBO.Count > 0 Then

     e.Parameters(0).Value = Me.CategoriasPubBO.YourPKFieldNameHere

Else

     e.Parameters(0).Value = 0

End If

Also I believe it is better to use sample with your real entities name, even if it is in Spanish, this way it will make more sense when posting real code Smile.

Edhy Rijo

Juan Carlos Pazos
Juan Carlos Pazos
StrataFrame User (310 reputation)StrataFrame User (310 reputation)StrataFrame User (310 reputation)StrataFrame User (310 reputation)StrataFrame User (310 reputation)StrataFrame User (310 reputation)StrataFrame User (310 reputation)StrataFrame User (310 reputation)StrataFrame User (310 reputation)
Group: Forum Members
Posts: 144, Visits: 227
Hi Edjy

Thanks for all your support. I still trying. If your have some simple sample, will be very good?

I think that in the ListPopulating should go the:

If Me.DetalleSubcategoriasBO.Count > 0 Then

e.Parameters(0).Value = Me.DetalleSubcategoriasBO.IdStio

Else

e.Parameters(0).Value = 0

End If

And in the SelectedIndexChanged the Requery()

Regards.



Smile Everything is possible, just keep trying...
Juan Carlos Pazos
Juan Carlos Pazos
StrataFrame User (310 reputation)StrataFrame User (310 reputation)StrataFrame User (310 reputation)StrataFrame User (310 reputation)StrataFrame User (310 reputation)StrataFrame User (310 reputation)StrataFrame User (310 reputation)StrataFrame User (310 reputation)StrataFrame User (310 reputation)
Group: Forum Members
Posts: 144, Visits: 227
Hi

All solved. Thanks a lot for your help.

Smile Everything is possible, just keep trying...

Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
You're welcome Juan.

Edhy Rijo

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Good stuff Smile  Good answers, Edhy!
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Better yet, if you could post a sample versus my brain having to do the compiling and execution that would be great Smile
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search