DE.SelectCat With DE.rsSelectCat .MoveFirst Do Until .EOF FrmListe_chxcat.selection.AddItem !Definition .MoveNext Loop .Close End With
____________________________________________ Private Sub cmdselect_Click() Dim BoxFrom, BoxTo As Object Set BoxFrom = Me.selection Set BoxTo = Me.choix SortList BoxFrom, BoxTo End Sub _____________________________________________ Function SortList(BoxFrom, BoxTo) Dim item As String Dim i As Integer, j As Long Dim counti As String Dim comp As String If BoxFrom.ListIndex = -1 Then Exit Function Else item = BoxFrom.Text If BoxTo.ListCount = 0 Then BoxTo.AddItem item, i BoxFrom.RemoveItem BoxFrom.ListIndex Else BoxTo.AddItem item BoxFrom.RemoveItem BoxFrom.ListIndex counti = BoxTo.ListCount - 1 For i = counti To 0 Step -1 For j = i - 1 To 0 Step -1 item = BoxTo.List(j) comp = BoxTo.List(i) If item > comp Then BoxTo.RemoveItem j BoxTo.AddItem item, i End If Next j Next i End If End If End Function ___________________________________________ Private Sub Form_Load() Call AffichageCat End Sub
Set AdoConnection = New ADODB.Connection Set AdoRecordset = New ADODB.Recordset ConnectString = "Immo" AdoConnection.Open ConnectString SQL = "SELECT blabla FROM blabla where blabla" AdoRecordset.Open SQL, AdoConnection