D
dhoover via AccessMonster.com
I'm using the code below to email clients selected from a list box. However,
the code sends individual emails to each client, I'd like to generate one
email and send to all the selected clients.
Dim strTo As String
Dim varItem As Variant
Dim ctrl As Control
Set ctrl = Me.lstEmailAddresses
If ctrl.ItemsSelected.Count > 0 Then
For Each varItem In ctrl.ItemsSelected
strTo = ctrl.ItemData(varItem)
DoCmd.SendObject _
, _
, _
, _
, _
, _
("" & strTo), _
, _
, _
True
Next varItem
End If
the code sends individual emails to each client, I'd like to generate one
email and send to all the selected clients.
Dim strTo As String
Dim varItem As Variant
Dim ctrl As Control
Set ctrl = Me.lstEmailAddresses
If ctrl.ItemsSelected.Count > 0 Then
For Each varItem In ctrl.ItemsSelected
strTo = ctrl.ItemData(varItem)
DoCmd.SendObject _
, _
, _
, _
, _
, _
("" & strTo), _
, _
, _
True
Next varItem
End If