bonjour
je recherche le moyen de réactualiser mes combobox en fonction du choix qui été fait dans le combo précedent.

en plus clair

dans le combo 1 qui est composé d'une liste de 7 items
si je choisi le N°1, celui ci ne doit plus apparaitre dans la liste du combo 2,
et si je choisi le N°3 dans le combo N°2 celui ci ne doit plus apparaitre dans les autres combo et ainsi de suite

Je vous joint une partie du code que j'ai déja fait

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
 Private Sub UpdateFeuille()
 
 
  '''''''''''''''''''''''''''''
        ' Alimentation du combo 1
        '''''''''''''''''''''''''''''
 
        Dim MyConnexion As OleDbConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data source=" & Application.StartupPath & "\gestionjoueurs.mdb;")
        Dim Mycommand As OleDbCommand = MyConnexion.CreateCommand()
 
        Mycommand.CommandText = "SELECT T_Joueur.IDJoueur,T_Joueur.Nom, T_Joueur.Prenom, T_Joueur.Dispo,T_Joueur.Init , T_Joueur.Pilier from T_Joueur where (T_Joueur.Dispo=1 and T_Joueur.Pilier=true and T_Joueur.Init=true)"
 
        MyConnexion.Open()
 
        Dim myReader As OleDbDataReader = Mycommand.ExecuteReader()
 
        ComboBox1.Items.Clear()
 
        Do While myReader.Read()
 
            strIdentifiant = CStr(myReader.GetValue(0))
            intLong = strIdentifiant.Length
            strIdentifiant = ""
            If intLong < 4 Then
                Dim i As Integer
                For i = 1 To (5 - intLong)
                    strIdentifiant = strIdentifiant & " "
                Next
                strIdentifiant = strIdentifiant & CStr(myReader.GetValue(0))
                strNomPrenom = strIdentifiant & " :" & myReader.GetString(1) & " " & myReader.GetString(2)
 
            End If
 
            ComboBox1.Items.Add(strNomPrenom)
 
 
        Loop
        myReader.Close()
 
        MyConnexion.Close()
        Me.Refresh()
 
 Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
        Dim MyConnexion2 As OleDbConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data source=" & Application.StartupPath & "\gestionjoueurs.mdb;")
        Dim Mycommand2 As OleDbCommand = MyConnexion2.CreateCommand()
 
        strToto = Mid(Me.ComboBox1.Text, 1, 5)
 
        If strToto <> "" Then
            If CInt(strToto) > 0 Then
 
                Mycommand2.CommandText = ("UPDATE T_JOUEUR SET INIT=false WHERE IdJoueur=") & CInt(strToto)
 
                MyConnexion2.Open()
 
                Dim myReader2 As OleDbDataReader = Mycommand2.ExecuteReader()
                MyConnexion2.Close()
 
            End If
        End If
 
    End Sub
La selection doit se faire par rapport a une info qui est mise a false dans une table acces

Merci pour votre aide
@+
Philippe