Merci pour ta rep ça marche mais j'ai dû rajouter quelque chose en plus :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| Private Sub Liste55_AfterUpdate()
Dim itm As Variant
Dim object As Control
Dim S, S1, S2 As String
'S2 =
Set Objctl = Me!Liste55
For Each itm In Objctl.ItemsSelected
S = S & """" & Objctl.Column(0, itm) & ""","
Next itm
S = Left(S, Len(S) - 1)
S1 = "SELECT DISTINCT YEAR(Match.date) FROM Match WHERE Match.Type_Match IN (" & S & ")"
ComboAnnée.RowSource = S1
End Sub |
En effet comme c'est du texte j'ai dû rajouter les guillemets à la ligne
S = S & """" & Objctl.Column(0, itm) & ""","
J'ai pas compris exactement pourquoi en revanche...
Partager