A
Apprentice
This is an unanswered post/repost pertaining to:
Post dated 5/7/2008
Subject: Emails from Access
This post was great information and helpful but:
I am using this code successfully and want to add a few bells and whistles.
1. I want the email to go out to only the current record, and not the
entire query. I think I can do this by just modifing the query.... Is that
the best way to approach this. I have several email address under one record.
2. I would also like to use this code in conjuction with an automatic email
based on a date field. Any suggestions?
Here is my current code:
Dim db As Database
Dim rs As Recordset
Dim ToVar As String
Dim sql As String
sql = "SELECT Team_Leader_Email FROM EmailTestCharterHeader"
Set db = CurrentDb
Set rs = db.OpenRecordset(sql, dbOpenSnapshot)
Do Until rs.EOF
ToVar = ToVar & rs!Team_Leader_Email & ";"
rs.MoveNext
Loop
DoCmd.SendObject acSendNoObject, , , ToVar,,,"Charter Notification","Your
Charter has been recently updated",True
Post dated 5/7/2008
Subject: Emails from Access
This post was great information and helpful but:
I am using this code successfully and want to add a few bells and whistles.
1. I want the email to go out to only the current record, and not the
entire query. I think I can do this by just modifing the query.... Is that
the best way to approach this. I have several email address under one record.
2. I would also like to use this code in conjuction with an automatic email
based on a date field. Any suggestions?
Here is my current code:
Dim db As Database
Dim rs As Recordset
Dim ToVar As String
Dim sql As String
sql = "SELECT Team_Leader_Email FROM EmailTestCharterHeader"
Set db = CurrentDb
Set rs = db.OpenRecordset(sql, dbOpenSnapshot)
Do Until rs.EOF
ToVar = ToVar & rs!Team_Leader_Email & ";"
rs.MoveNext
Loop
DoCmd.SendObject acSendNoObject, , , ToVar,,,"Charter Notification","Your
Charter has been recently updated",True