DoCmd.SendObject help

beginner123

Registered User.
Local time
Today, 14:48
Joined
Apr 13, 2013
Messages
44
Hi All,

Still learning slowly..
I am trying to test sending an email via

Private Sub CommandEmail_Click()
'DoCmd.SendObject _
' , _
' , _
' , _
' "test@test.com", _
' , _
' , _
' "Subject", _
' "Message", _
' False

This works.

If I then try and email a report HoursMonth
Private Sub CommandEmail_Click()
DoCmd.SendObject _
acSendReport, _
"HoursMonth", _
acFormatRTF, _
"tess@test.com", _
, _
, _
"Subject", _
"Message", _
False

I get the error the object doesn't contain the automation object me?

Therefore is this referring to it can't find the report?
The CommandEmail_Click()
is located on a form Hours

Any guidance appreciated.
Rob
 
Sounds like your report has something in the HoursMonth report which refers to ME that is not in the VBA window. ME is only good within the context of VBA and will generate an error if used outside of that context.
 

Users who are viewing this thread

Back
Top Bottom