Bonjour à tous !
Voila j'essaye de faire apparaitre dans un label des informations stockées dans un base acces, apparaissant lorsque l'on click sur un combo proposant une liste déroulante
Cependant je n'arrive pas à rafraichir le label , il ya donc toujours la meme chose d'afficher

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
 
Private Sub cmdAfficher_Click()
Dim rst As New ADODB.Recordset
 
Dim strDateDebut As String
Dim strDateFin As String
Dim strResume As String
Dim strAffiche As String
Dim intCpt As Integer
 
    strAffiche = "Mois Selectionner : " & Me.cboMois.Text & vbCrLf & vbCrLf _
            & "Informations : " & vbCrLf
 
        For intCpt = 0 To Me.lstSpectMois.ListCount - 1
            If Me.lstSpectMois.Selected(intCpt) Then
              rst.Open "SELECT date_debut,date_fin,resume FROM Janvier", cnx, adOpenDynamic, adLockOptimistic
                If Not rst.EOF Then
                    Do Until rst.EOF
                        strDateDebut = rst.Fields("date_debut").Value
                        strDateFin = rst.Fields("date_fin").Value
                        strResume = rst.Fields("resume").Value
                        rst.MoveNext
                    Loop
                End If
                strAffiche = strAffiche & vbCrLf & Me.lstSpectMois.List(intCpt) & vbCrLf & strDateDebut & vbCrLf & strDateFin & vbCrLf & strResume
            End If
        Next intCpt
 
 Me.lblInfo.Caption = strAffiche
 
   rst.Close
   Set rst = Nothing
End Sub