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

Hi!

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.Tipologia, 
		c.[Codice categoria]
FROM	tblCategorieGuasto AS c INNER JOIN
        tblCodiciGuasto AS d ON c.[Codice categoria] = d.[Categoria Guasto]

Open in new window

tblCategorieGuasto.png
tblCodiciGuasto.png
frmRiparazione.png
LVL 1
ZaurbAsked:
Who is Participating?
 
ZaurbAuthor Commented:
Thank you!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.