DiveKennene
Registered User.
- Local time
- Today, 01:55
- Joined
- May 8, 2008
- Messages
- 18
Hello All,
I am in some serious need of help! I have created a database where I store customers info, including email address and date they became a customer. I have a form set up to run a query for sending out an email reminder to them. The problem is, the VB code will send out the email to the first recipient, but when it goes to loop through the recordset created by the query, I get the dreaded 2498 error. Here is the code I have on my form:
Private Sub Form_Load()
Dim dbs As DAO.Database
Dim rs As DAO.Recordset
Dim Email As Variant
Set dbs = CurrentDb
Set rs = dbs.OpenRecordset("Repack Reminder Query")
Do While Not rs.EOF
DoCmd.SendObject , , , rs.Fields("Email"), , , "Subject", "Message", False
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
End Sub
What is wrong with this picture? Any help is GREATLY appreciated.
Thank you,
Matt
I am in some serious need of help! I have created a database where I store customers info, including email address and date they became a customer. I have a form set up to run a query for sending out an email reminder to them. The problem is, the VB code will send out the email to the first recipient, but when it goes to loop through the recordset created by the query, I get the dreaded 2498 error. Here is the code I have on my form:
Private Sub Form_Load()
Dim dbs As DAO.Database
Dim rs As DAO.Recordset
Dim Email As Variant
Set dbs = CurrentDb
Set rs = dbs.OpenRecordset("Repack Reminder Query")
Do While Not rs.EOF
DoCmd.SendObject , , , rs.Fields("Email"), , , "Subject", "Message", False
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
End Sub
What is wrong with this picture? Any help is GREATLY appreciated.
Thank you,
Matt