Strange e-mailing report prob

bone head

Registered User.
Local time
Today, 23:58
Joined
Feb 11, 2002
Messages
73
Hi

I am having strange problems e-mailing a report I have used variations on the following code several times before with no problems, however on this occasion strange things are occurring.

It seems I can mail the report once fine, if however I move to another record or try to send the form again I get the message saying mail has been sent which it has not, I also do not get the email ( outlook ) opening up as it does normally.

As I said I have not encountered this problem before, anyone got any ideas what is going on here

Private Sub Command36_Click()
On Error GoTo Err_Command36_Click

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

Dim stDocName As String
stDocName = "ap3"

DoCmd.OpenReport stDocName, acViewPreview, , "[ID]=" & Forms![ap3]![ID]

DoCmd.SendObject acReport, "ap3", "RichTextFormat(*.rtf)", "e-mail address", , , "Defect Report", "Please find attached a defect report from ", True
MsgBox "E-mail has been sent"

DoCmd.Close

Exit_Command36_Click:
Exit Sub

Err_Command36_Click:
MsgBox Err.Description
Resume Exit_Command36_Click

End Sub


Many thanks in advance

Paul
 

Users who are viewing this thread

Back
Top Bottom