filter values in a combo box based upon selection in another combo box
Posted on 2009-12-22
Alright, I am transitioning over to Visual Studios from VBA and I'm still working though some of the differences.
I have a data driven application connected to an MSSQL database. I have a form that I am using to allow the end user to post to it.
What I am trying to do right now is I have one combo box with a list of abbriviated State names (abStateComboBox) and another combo box that has a list of all US Counties (countyComboBox), both are bound to tables in the SQL. (tblState and tblCounties respectively) the counties table also includes the corresponding abbreviated state names associated with the county.
All I need to do is simply filter the counties based upon the selected text in the stateComboBox so that only the counties applying to that abbreviated state will apply. It's a very simple SQL query, but I am not sure how to translate it into VB.Net properly.
Thanks for the help!