bonekrusher
Registered User.
- Local time
- Yesterday, 20:01
- Joined
- Nov 19, 2005
- Messages
- 266
Hi All,
I've searched the forum and I cant seem to find a solution to a simple problem. I am trying to gather a bunch of email addressed into a string, to send out a mass email to all my admins. The code below only emails the last email address in the record.
Thanks for the help
I've searched the forum and I cant seem to find a solution to a simple problem. I am trying to gather a bunch of email addressed into a string, to send out a mass email to all my admins. The code below only emails the last email address in the record.
Thanks for the help
Code:
Dim rst As DAO.Recordset
Dim strAddress as string
While Not rst.EOF
With rst
If rst![admin] = -1 Then
MsgBox rst![name] & " is an admin"
strAddress = rst![EMAIL]
With EmailItem
.Subject = "QA Audit Schedule for " & Date
.Body = EMailComment
.To = strAddress
.Importance = olImportanceHigh
.Attachments.Add sFile
.Send
End With
Else: End If
End With
rst.MoveNext
Wend