T
TheNovice
All,
I have a continuous form that list our sales persons, and a link to send Off
Day Deliveries
I am using the SendObject. What I would like to do is, in the morning have
it send out the reports automatically without me having to use "Alt + S"
Attached is the Code that I am using.
Any and all Help is appreciated
------------------------------------------------------------------------------------------
Private Sub Command10_Click()
On Error GoTo Err_Command10_Click
Dim stDocName As String
Dim stToName As String
Dim stCCName As String
Dim stDate As String
Dim stsubjline As String
Dim stbody As String
Dim stDSM As String
stDocName = "rptDistrictOffDayDelivery"
stToName = Me.DSMID
stCCName = Me.RSMID
stDate = Me.SESSION_DATE
stDSM = Me.CMMGR_
stsubjline = "Off Day Delivery Report for DSM " + stDSM + " on " + stDate
stbody = "Enclosed is the Off Day Delivery Report for your District"
DoCmd.SendObject acReport, stDocName, "Snapshot Format", stToName,
stCCName, , stsubjline, stbody
Exit_Command10_Click:
Exit Sub
Err_Command10_Click:
MsgBox Err.Description
Resume Exit_Command10_Click
End Sub
I have a continuous form that list our sales persons, and a link to send Off
Day Deliveries
I am using the SendObject. What I would like to do is, in the morning have
it send out the reports automatically without me having to use "Alt + S"
Attached is the Code that I am using.
Any and all Help is appreciated
------------------------------------------------------------------------------------------
Private Sub Command10_Click()
On Error GoTo Err_Command10_Click
Dim stDocName As String
Dim stToName As String
Dim stCCName As String
Dim stDate As String
Dim stsubjline As String
Dim stbody As String
Dim stDSM As String
stDocName = "rptDistrictOffDayDelivery"
stToName = Me.DSMID
stCCName = Me.RSMID
stDate = Me.SESSION_DATE
stDSM = Me.CMMGR_
stsubjline = "Off Day Delivery Report for DSM " + stDSM + " on " + stDate
stbody = "Enclosed is the Off Day Delivery Report for your District"
DoCmd.SendObject acReport, stDocName, "Snapshot Format", stToName,
stCCName, , stsubjline, stbody
Exit_Command10_Click:
Exit Sub
Err_Command10_Click:
MsgBox Err.Description
Resume Exit_Command10_Click
End Sub