VB. NET Data Binding: How to drill down with listboxes and comboboxes

Posted on 2009-02-23
Last Modified: 2013-11-06

I have two tables as in the attached images and I've configured a dataset as in the query below. Form I'm trying to build is also in the attached image.

What I need to do is to drill down to [Descrizione Guasto] by making selection from two preceding listboxes. Let's say if user selects some value in Tipologia (which has to be DISTINCT... but now it's not) then the [Descrizione Categoria] is filtered out according to this. After selecting [Descrizione Categoria] user will be presented with the filtered out rows in the [Descrizione Guasto] combobox.

1) How do I make a databound listbox display only distinct values in this scenario?
2) How do I tie all these controls together?

Many thanks in advance!
SELECT  d.[Guasto ID], 

		d.[Descrizione Guasto], 

		d.[Categoria Guasto], 

		c.[Descrizione categoria], 


		c.[Codice categoria]

FROM	tblCategorieGuasto AS c INNER JOIN

        tblCodiciGuasto AS d ON c.[Codice categoria] = d.[Categoria Guasto]

Open in new window

Question by:Zaurb
    LVL 69

    Accepted Solution

    LVL 1

    Author Closing Comment

    Thank you!

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
    It’s quite interesting for me as I worked with Excel using for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
    The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
    The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now