P
PHil
Hi all,
Here is my prob.
I have a screen with several lines (dynamic, could be more or less, but
minimum = 1)
Each line contains a user with his email
I need to take his email of every line and concatene it in a field
I pick the following code but I am not able to adapt it to my purpose.
Can somebody help me ?
The name of the field is Me!
I want the stRecipient to have all emails separated by ";"
(dont know how to manipulate field on repetitive screen)
Here is the "stolen" and adapted code. It stops a the second line (dont know
what is this .ItemsSelect.Count ....). vItm is declared as variant
stRecipient as String
With Me![Email]
If .ItemsSelected.Count > 0 Then
For vItm = 0 To .ListCount - 1
If .Selected(vItm) = True Then
stRecipient = stRecipient & .ItemData(vItm) & ";"
End If
Next vItm
MsgBox stRecipient
Else
MsgBox "Il n'y a personne à qui envoyer d'invitation."
Exit Sub
End If
End With
Here is my prob.
I have a screen with several lines (dynamic, could be more or less, but
minimum = 1)
Each line contains a user with his email
I need to take his email of every line and concatene it in a field
I pick the following code but I am not able to adapt it to my purpose.
Can somebody help me ?
The name of the field is Me!
I want the stRecipient to have all emails separated by ";"
(dont know how to manipulate field on repetitive screen)
Here is the "stolen" and adapted code. It stops a the second line (dont know
what is this .ItemsSelect.Count ....). vItm is declared as variant
stRecipient as String
With Me![Email]
If .ItemsSelected.Count > 0 Then
For vItm = 0 To .ListCount - 1
If .Selected(vItm) = True Then
stRecipient = stRecipient & .ItemData(vItm) & ";"
End If
Next vItm
MsgBox stRecipient
Else
MsgBox "Il n'y a personne à qui envoyer d'invitation."
Exit Sub
End If
End With