DiveKennene
Registered User.
- Local time
- Today, 14:01
- Joined
- May 8, 2008
- Messages
- 18
OK. I am actually making progress on my project. I have a database set up to automatically send emails to certain customers when a certain time frame comes up (set up through a query that "gathers" all customer emails that fall within a certain time frame). My code goes through the list and sends out the emails one by one until everyone in the query has had an email sent to them. What I need to do now is: after the email is sent to joe at anything dot com, I need to check the checkbox (Check107) that is on my main form (called "Customers") and as this code loops it searches for any customer email that is checked so as to not send emails every time the form loads. Here is the working code I have for sending the emails. Any help is hugely appreciated.
Private Sub Form_Load()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strEmail As String
Set db = CurrentDb
Set rs = db.OpenRecordset("Repack Reminder Query")
Do While Not rs.EOF
strEmail = rs.Fields("Email")
DoCmd.SendObject , , HTML, strEmail, , , "Reserve is going out of Date!", "Please be advised, your Reserve is going out of date soon!", False
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
End Sub
Private Sub Form_Load()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strEmail As String
Set db = CurrentDb
Set rs = db.OpenRecordset("Repack Reminder Query")
Do While Not rs.EOF
strEmail = rs.Fields("Email")
DoCmd.SendObject , , HTML, strEmail, , , "Reserve is going out of Date!", "Please be advised, your Reserve is going out of date soon!", False
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
End Sub