Dear All,
I am trying different methods to send auto emails based on my ADP form (my back database is SQL SERVER 2000)
here is an almost done CODE, but the problem is it repeat sending the email for only first record
can any one please fix it to read the next record as well
and then send the email again
'-----------------------------------------------------
Private Sub Command27_Click()
Set myrecordset = Me.RecordsetClone
With myrecordset
myrecordset.MoveFirst
Do Until myrecordset.EOF
DoCmd.SendObject acSendNoObject, , , "farzam.aliffi@cec.eu.int", , , "Job Alert", "Dear " + [TaskM] + vbCrLf + "Please carry on with the following Task " + vbCrLf + "------------------------------------------------" + vbCrLf + vbCrLf + [Task] + vbCrLf + vbCrLf + "------------------------------------------------" + vbCrLf + vbCrLf + vbCrLf + vbCrLf + vbCrLf + "Regards," + vbCrLf + "Database Section ", No
myrecordset.MoveNext
Loop
End With
Set myrecordset = Nothing
End Sub
I am trying different methods to send auto emails based on my ADP form (my back database is SQL SERVER 2000)
here is an almost done CODE, but the problem is it repeat sending the email for only first record
can any one please fix it to read the next record as well
and then send the email again
'-----------------------------------------------------
Private Sub Command27_Click()
Set myrecordset = Me.RecordsetClone
With myrecordset
myrecordset.MoveFirst
Do Until myrecordset.EOF
DoCmd.SendObject acSendNoObject, , , "farzam.aliffi@cec.eu.int", , , "Job Alert", "Dear " + [TaskM] + vbCrLf + "Please carry on with the following Task " + vbCrLf + "------------------------------------------------" + vbCrLf + vbCrLf + [Task] + vbCrLf + vbCrLf + "------------------------------------------------" + vbCrLf + vbCrLf + vbCrLf + vbCrLf + vbCrLf + "Regards," + vbCrLf + "Database Section ", No
myrecordset.MoveNext
Loop
End With
Set myrecordset = Nothing
End Sub