1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| Private Sub btnListe_Click()
Dim VarI As Variant
Dim strFiltre As String
strFiltre = ""
If Me!lstAdherents.ItemsSelected.Count = 0 Then
MsgBox "Selectionnez un ou des adhérents"
Else
For Each VarI In Me!lstAdherents.ItemsSelected
If strFiltre <> "" Then Str strFiltre = strFiltre & " or "
strFiltre = strFiltre & "IdAdh = '" & _
Me!lstAdherents.ItemData(VarI) & "'"
Next VarI
Me!lstAdherents.Requery
DoCmd.OpenReport "E_ListeAdherents", acViewPreview, strFiltre, IdAdh = False
End If
End Sub |
Partager