RickDB
Registered User.
- Local time
- Today, 09:10
- Joined
- Jun 29, 2006
- Messages
- 101
Hello,
Hopefully no one is irritated by *another* send report by e-mail post, but everyone I see is for doing much more than what I need and I cannot get the code to work.
I would post the send code I have, but it is so broken I think it would be useless for figuring this out. I have tried several different ways to get this to work, and each one gives me a different set of errors / undesired results.
I have provided the VBA used for printing current report - works perfect (for illustration purposes only)
All I want to do is send a simple, one page report based on the current form's OrderID to 4 static e-mail addresses (as is done in the print command above). There will be no variable mailing list, as these are all inter-office personnel and we have no turnover.
I would prefer to send the page in HTML or Snapshot format.
Now, I have been looking at posts on how to get the report to be into the e-mail's body as opposed to being an attachment, but for all the trouble I am having with the simple attachment, I will open that can of worms later... Although I it seems silly something like that wouldn't be a simple function built into Access!
Thanks for any replies!
Hopefully no one is irritated by *another* send report by e-mail post, but everyone I see is for doing much more than what I need and I cannot get the code to work.
I would post the send code I have, but it is so broken I think it would be useless for figuring this out. I have tried several different ways to get this to work, and each one gives me a different set of errors / undesired results.
I have provided the VBA used for printing current report - works perfect (for illustration purposes only)
Private Sub cmdPrintReport_Click()
On Error GoTo Err_cmdPrintReport_Click
Dim stDocName As String
Dim strWhere As String
strWhere = "[OrderID]= " & Me.[OrderID]
stDocName = "rptCompleteOrder"
DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenReport stDocName, acNormal, , strWhere
Exit_cmdPrintReport_Click:
Exit Sub
Err_cmdPrintReport_Click:
MsgBox Err.Description
Resume Exit_cmdPrintReport_Click
End Sub
All I want to do is send a simple, one page report based on the current form's OrderID to 4 static e-mail addresses (as is done in the print command above). There will be no variable mailing list, as these are all inter-office personnel and we have no turnover.
I would prefer to send the page in HTML or Snapshot format.
Now, I have been looking at posts on how to get the report to be into the e-mail's body as opposed to being an attachment, but for all the trouble I am having with the simple attachment, I will open that can of worms later... Although I it seems silly something like that wouldn't be a simple function built into Access!
Thanks for any replies!
Last edited: