T
tgavin
I am embarrassed to say I have never been able to get an each, next to
work...probably due to my learn by problem method instead of an organized
class but I am hoping that by conquering this one, I will finally get it.
I need to send an email to each of the people returned by an query. I
created a form with the email info and a button for sending it, which works
fine for the first record but none of the others. Here is the code I wrote
for the cmd button...what am I doing wrong???
Private Sub cmdSend_Click()
Dim ctl As Control
Dim rst As Recordset
ctl = [txtEmail]
For Each ctl In rst
DoCmd.SendObject acSendNoObject, , , [txtEmail], [CC], , [Subject],
[Message]
Next ctl
End Sub
Terri
work...probably due to my learn by problem method instead of an organized
class but I am hoping that by conquering this one, I will finally get it.
I need to send an email to each of the people returned by an query. I
created a form with the email info and a button for sending it, which works
fine for the first record but none of the others. Here is the code I wrote
for the cmd button...what am I doing wrong???
Private Sub cmdSend_Click()
Dim ctl As Control
Dim rst As Recordset
ctl = [txtEmail]
For Each ctl In rst
DoCmd.SendObject acSendNoObject, , , [txtEmail], [CC], , [Subject],
[Message]
Next ctl
End Sub
Terri