SendObject Sends Me Loopy

A real begineer

Registered User.
Local time
Today, 16:39
Joined
Nov 4, 2000
Messages
74
I have the following code behind a form. The code is cut and paste and I don't hve all the lines broken out quite like this.


If IsNull(memMail) = False Then

DoCmd.SetWarnings False

DoCmd.SendObject acSendReport, "rptMailComment", acFormatXLS, "dps@tpg.com.au", ,, "My Message", ,False

MsgBox "Your message has been emailed. We will respond shortly."

Else

MsgBox "Your message is blank, therefore no message has been sent"

End If


When this code runs it is supposed to send the form or report (I have tried both options), as an email. This works fine on my development machine, however, on my runtime machine it crashes out with a runtime error.

Help seems to indicate there is nothing wrong with this code, and I can't see where the problem is.

To add to my confusion it does work on another machine if I try and send as a report, however, if I try and send the form, which is what I want to send it creates a run time error.


[This message has been edited by A real begineer (edited 08-03-2001).]
 

Users who are viewing this thread

Back
Top Bottom