469,923 Members | 1,337 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,923 developers. It's quick & easy.

Auto email a report

I have a form that contains a button which runs a report based on a
query. The code as far as I can tell is as follows:
*
Private Sub Email_Headend_Fiber_Click()
On Error GoTo Err_Email_Headend_Fiber_Click

Dim stDocName As String

stDocName = "New_Node_Notification_Report"
DoCmd.SendObject acReport, stDocName

Exit_Email_Headend_Fiber_Click:
Exit Sub

Err_Email_Headend_Fiber_Click:
MsgBox Err.Description
Resume Exit_Email_Headend_Fiber_Click

End Sub
*
Since I am emailing the same two people this information all the time,
I would like to have the report exported in excel (I now get a dialog
box that comes up where I have to choose from excel, snapshot, html,
etc.), auto addressed to the 2 parties and automatically sent out. Can
anyone explain how to do this? (what code to enter and where in the
commands above)

Thanks
Nov 12 '05 #1
1 1671
Look up the help for your DoCmd.SendObject acReport, stDocName command.
There are more options. You just need to define the remaining options then
you are good to go.

--
Dean Covey
www.coveyaccounting.com

MS-Office Certified:
http://www.microsoft.com/learning/mc...st/default.asp

"Gary" <ga**********@adelphia.com> wrote in message
news:8c**************************@posting.google.c om...
I have a form that contains a button which runs a report based on a
query. The code as far as I can tell is as follows:
*
Private Sub Email_Headend_Fiber_Click()
On Error GoTo Err_Email_Headend_Fiber_Click

Dim stDocName As String

stDocName = "New_Node_Notification_Report"
DoCmd.SendObject acReport, stDocName

Exit_Email_Headend_Fiber_Click:
Exit Sub

Err_Email_Headend_Fiber_Click:
MsgBox Err.Description
Resume Exit_Email_Headend_Fiber_Click

End Sub
*
Since I am emailing the same two people this information all the time,
I would like to have the report exported in excel (I now get a dialog
box that comes up where I have to choose from excel, snapshot, html,
etc.), auto addressed to the 2 parties and automatically sent out. Can
anyone explain how to do this? (what code to enter and where in the
commands above)

Thanks

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Nothing | last post: by
1 post views Thread by Gary | last post: by
2 posts views Thread by Tee GEE | last post: by
10 posts views Thread by Des | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.