D
DianeM
I'm trying to create some code that will open a query and send an e-
mail reminder to every record in that query. I've found lots of
examples and have followed them as closely as possible, but I keep
getting errors. Does anyone have any pointers?
This is the code I currently have (I'm using Access 2003):
Private Sub CreateEmailsButton_Click()
Dim db As DAO.Database
Dim rstReminders As DAO.Recordset
Set db = CurrentDb()
Set rstReminders = db.OpenRecordset("qryReminders")
'ERROR: when I get to the line above, I get the
following error:
'Run Time Error '3061': Too few parameters. Expected 1.
For Each record In rstReminders
DoCmd.SendObject acSendNoObject, , ,
[EmailAddressFieldFromQuery], _
"cc Line address", , "Subject line text", "Message body
text"
Next
End Sub
Thanks in advance for your thoughts!
mail reminder to every record in that query. I've found lots of
examples and have followed them as closely as possible, but I keep
getting errors. Does anyone have any pointers?
This is the code I currently have (I'm using Access 2003):
Private Sub CreateEmailsButton_Click()
Dim db As DAO.Database
Dim rstReminders As DAO.Recordset
Set db = CurrentDb()
Set rstReminders = db.OpenRecordset("qryReminders")
'ERROR: when I get to the line above, I get the
following error:
'Run Time Error '3061': Too few parameters. Expected 1.
For Each record In rstReminders
DoCmd.SendObject acSendNoObject, , ,
[EmailAddressFieldFromQuery], _
"cc Line address", , "Subject line text", "Message body
text"
Next
End Sub
Thanks in advance for your thoughts!