Email to multiple recipients (1 Viewer)

mcgheec3

New member
Local time
Today, 05:02
Joined
Aug 8, 2008
Messages
2
I have created 6 queries that extract email addresses depending on a field called status. Simple.

I now want to set up a email facility that will take the query and enter them in the BCC field. I have found different ways to email 1 individual at a time but need to know how to do it as a bulk

Please note I have only been using access for a short time and will need step by step help on this if possible but anything that will help is appreciated
 

zanaeira

Registered User.
Local time
Today, 05:02
Joined
Aug 8, 2008
Messages
18
Ok this is the method I've used for a similar problem:

Firstly, create an unbound form (meaning it has no record source). Then add a listbox control to the form. Set its properties on the property sheet to:

Multi Select: Extended
RowSource: "QueryThatRetrievesEmailAdds" (The name of your query)
Name: "MyListBox" (Whatever you want to name your listbox)

Then add a button "E-mail" or whatever you prefer. And add the following code for its On Click event.

Dim varItem As Variant
Dim strAddress As String
On Error GoTo Err_Handler
If Me.MyListBox.ItemsSelected.Count = 0 Then
MsgBox "You must select at least one e-mail address", vbOKOnly+vbInformation, _
"Select E-mail Address"
End If

For Each varItem in Me!MyListBox.ItemsSelected
strAddress = strAddress & Chr(34) & Me!MyListBox.Column(1,varItem) & Chr(34) & _
","
Next varItem

strAddress = Left$(strAddress, Len(strAddress) - 1)

DoCmd.SendObject acSendNoObject, Bcc:=strAddress
Err_Handler:
If Err.Number = 2501 Then
MsgBox "You did not send the e-mail.", vbOKOnly+vbInformation, "E-mail not sent"
ElseIf Err.Number > 0 Then
MsgBox "There was an error sending this e-mail", vbOKOnly+vbInformation, _
"E-mail not sent"
End If
Exit Sub

Hope this helps. Let me know if you need any more help. :)
 

mcgheec3

New member
Local time
Today, 05:02
Joined
Aug 8, 2008
Messages
2
thanks but I had found a solution for it on the site. Thanks for your time:)
 

Users who are viewing this thread

Top Bottom