B
blsaint
I am new at this and want to send an email to each recipient a query gives
me. I am sending the email from a form based on the query. The problem is
that it only sends an email to the first line, the loop does not work.
Please help.
Private Sub cmdSendEmails_Click()
Dim db As DAO.Database
Set db = CurrentDb()
With Me.RecordsetClone
Do Until .EOF
DoCmd.SendObject acSendNoObject, Cierre_de_cuentas, acFormatPDF,
Nz(Me!EMAIL), , , _
"Su Número de Cuenta: " & Nz(Me!NUM_CTA) & " está por vencer.", _
"Favor de revisar la fecha de cierre de su cuenta. ComunÃquese a la
Oficina de Finanzas lo antes posible.", Yes
.MoveNext
Loop
End With
db.Close
Set db = Nothing
End Sub
me. I am sending the email from a form based on the query. The problem is
that it only sends an email to the first line, the loop does not work.
Please help.
Private Sub cmdSendEmails_Click()
Dim db As DAO.Database
Set db = CurrentDb()
With Me.RecordsetClone
Do Until .EOF
DoCmd.SendObject acSendNoObject, Cierre_de_cuentas, acFormatPDF,
Nz(Me!EMAIL), , , _
"Su Número de Cuenta: " & Nz(Me!NUM_CTA) & " está por vencer.", _
"Favor de revisar la fecha de cierre de su cuenta. ComunÃquese a la
Oficina de Finanzas lo antes posible.", Yes
.MoveNext
Loop
End With
db.Close
Set db = Nothing
End Sub