Right!!
I am trying to send an email to all the records i have selected from a continuous form ... my code at the moment is not even start due to activex or ole problems (not sure what it means ) but can anyone look at the code i haev written and tell me why or whether it is any good .. i thikn it should work but cant run due to active x or ole prob that is a mystery to me!
Thanks ed
I am trying to send an email to all the records i have selected from a continuous form ... my code at the moment is not even start due to activex or ole problems (not sure what it means ) but can anyone look at the code i haev written and tell me why or whether it is any good .. i thikn it should work but cant run due to active x or ole prob that is a mystery to me!
Code:
Private Sub Email_Job_Details_Click()
On Error GoTo Err_Email_Job_Details_Click
'Set Focus to correct form and Goto First Record
Me.Form_Perm_Jobs.Put_Forward.SetFocus
DoCmd.GoToRecord , , acFirst
Do
Select Case Me!Selected.Value
Case True
DoCmd.SendObject acSendNoObject, , , Forms![Perm Jobs]![Put Forward].Form.Email, , , "Re:" & Forms![Perm Jobs].[Job Title], "Dear " & Me.Title & " " & Me.Last_Name & ",", , False
'Leave loop if that was the last record.
If CurrentRecord = RecordsetClone.RecordCount Then Exit Do Else DoCmd.GoToRecord , , acNext
Case False
DoCmd.GoToRecord , , acNext
Loop Until CurrentRecord = RecordsetClone.RecordCount And Me!Selectd.Value = False
End Sub
Err_Email_Job_Details_Click:
MsgBox Err.Description
Resume Exit_Email_Job_Details_Click
End Sub
Thanks ed