I load one drop down with 7 Departments and a Second Dropdwn is supposed to populate the 2nd cdropdown does nothing

OkA vb.net datasheet that should load both combo boxes A vb.net datasheet that should load both combo boxes when I load the first one I have a access database with al values for selection once you go to select a VALUE YOU REALIZE IT'S NOT THERE. SAY cOMBO BOX GETS LOADED to do a two step query if I select Holy Family which is once of the choices you should have maybe 5-10 values that can be used here is a pic so you understand
tHIS SHOULD SHOW HOW ONE COMBO GETS FULL AND YOU CAN GRAB A VALUE Please help I need to get this by this weekend. I'M STILL TRYING JUST LOOKING FOR EXTRA HELP.
Tom PowersAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kamal KhaleefaInformation Security SpecialistCommented:
HI

your question is not clear . any way if you need to populate the second combo box based on the first combo box

then try to call it from the first combo box Event handler
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
As King2002 mentions, you can use one of the Events of the first combo to load the second. For example, if you use the Change event of the first combo, you could do something like this:

Using con As New SQLConnection("Your connect string")
  Using cmd As New SQLCommand("SELECT Col1, Col2 FROM YourTable WHERE SomeIDField=" & Me.Combo1.Text, con)
    Using dt As New Datatable
      dt.Load(cmd.ExecuteReader)
        SecondCombo.DataSource = ""
        SecondCombo.DisplayMember = "Col1"
        SecondCombo.ValueMember = "Col2"  
    End Using
  End Using
End Using

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Tom PowersAuthor Commented:
Thanks
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.