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
| '----------------------------------------------------------------
Private Sub Selection_Click()
Dim varI As Variant 'num index
Dim V_num As Integer
Dim V_civilite As String
Dim V_nom As String
Dim V_prenom As String
Dim V_qualité As String
Dim V_organisation As String
Dim V_num_recommande As String
If Me.lst_Correspondants.ItemsSelected.Count = 0 Then
MsgBox "Aucun correspondants n'a été sélectionné"
Else
For Each varI In Me.lst_Correspondants.ItemsSelected
'MsgBox Me.lst_Correspondants.ItemData(varI)
V_num = Me.lst_Correspondants.Column(0, varI)
V_civilite = Me.lst_Correspondants.Column(1, varI)
V_nom = Me.lst_Correspondants.Column(2, varI)
V_prenom = Me.lst_Correspondants.Column(3, varI)
V_qualité = Me.lst_Correspondants.Column(4, varI)
V_organisation = Me.lst_Correspondants.Column(5, varI)
V_num_recommande = Me.lst_Correspondants.Column(6, varI)
MsgBox V_nom & " - " & V_num_recommande
DoCmd.OpenReport "rpt_Correspondants_100000", acViewPreview, , "Num_Co =" & V_num
Next varI
End If
End Sub |
Partager