Hi guys
In my application I have some comboboxes (three to be exact) who all share the same datasource. The problem is the following: when the user clicks one of the comboboxes and selects an item, then in the other comboxes the same item also becomes selected. How can I avoid this?
I wrote the following code:
VB Code:
'creation of the dataset Dim SQLDossier As String SQLDossier = "SELECT * FROM basisgegevens" ConnectionDossier.Open() DADossier = New OleDbDataAdapter(SQLDossier, ConnectionDossier) DADossier.Fill(DSDossier, "tblDossier") ConnectionDossier.Close() 'filling of the comboboxes CmbDossier1.DataSource = Me.DSDossier CmbDossier1.DisplayMember = "tblDossier.DOSSNR" CmbDossier2.DataSource = Me.DSDossier CmbDossier2.DisplayMember = "tblDossier.DOSSNR" CmbDossier3.DataSource = Me.DSDossier CmbDossier3.DisplayMember = "tblDossier.DOSSNR"
I already tried to clear the databindings of the combobox control but that doesn't works correct.
How should I do this?
Any ideas?
thnax




Reply With Quote