Please find attached a snapshot of the form and find below the VB code I used.
Top Observers Listbox
Private Sub MailTo1_Click()
Dim varItem As Variant
Dim strList As String
With Me!MailTo1
If .MultiSelect = 0 Then
Me!txtSelected = .Value
Else
For Each varItem In .ItemsSelected
strList = strList & .Column(0, varItem) & ";"
Next varItem
strList = left$(strList, Len(strList) - 1)
Me!txtSelected = strList
End If
End With
End Sub
Send Button
Private Sub cmdEmail_Click()
On Error GoTo Err_cmdEmail_Click
Dim strEmail As String
Dim strMailSubject As String
Dim strMsg As String
strEmail = Me.txtSelected & vbNullString
strMailSubject = Me.txtMailSubject & vbNullString
strMsg = Me.txtMsg & vbNullString
Me.cmdEmail.Enabled = True
DoCmd.SendObject , , To:=strEmail, Subject:=strMailSubject, MessageText:=strMsg
Exit_cmdEmail_Click:
Exit Sub
Err_cmdEmail_Click:
MsgBox "Email disconnected"
Resume Exit_cmdEmail_Click
End Sub
I want to send the email for all emails on the list?
Appreciate your help.