Hi
I'm trying to send the contents of a recordset via individual emails to the same person.
I can make this work if I'm attaching a report or if it's just one record, but for some reason I can't get the .movenext to work. The code will even send the correct number of emails, it's just sending the 1st record x number of times instead of looping through, could anyone tell me what i've done wrong.
Ideally this should run when an unrelated form opens, but to try and help myself i've created a form to display the records (it didn't help)!
Thanks very much
Dim rs as recordset
Set rs = currentdb.openRecordset ("qry_EOOM")
rs.movefirst
Docmd.openform "frm_EOOM"
Do until rs.EOF
DoCmd.SendObject acSendNoObject,,,"jo@****.co.uk",,,"Record " & [me.EOOMID] & " Needs Updating", "EOOM ID: " & [EOOM] & vbnewline & vbNewline & ..........
rs.movenext
Loop
Docmd.Close "frm_EOOM"
I'm trying to send the contents of a recordset via individual emails to the same person.
I can make this work if I'm attaching a report or if it's just one record, but for some reason I can't get the .movenext to work. The code will even send the correct number of emails, it's just sending the 1st record x number of times instead of looping through, could anyone tell me what i've done wrong.
Ideally this should run when an unrelated form opens, but to try and help myself i've created a form to display the records (it didn't help)!
Thanks very much
Dim rs as recordset
Set rs = currentdb.openRecordset ("qry_EOOM")
rs.movefirst
Docmd.openform "frm_EOOM"
Do until rs.EOF
DoCmd.SendObject acSendNoObject,,,"jo@****.co.uk",,,"Record " & [me.EOOMID] & " Needs Updating", "EOOM ID: " & [EOOM] & vbnewline & vbNewline & ..........
rs.movenext
Loop
Docmd.Close "frm_EOOM"