G
Guest
Hi,
I've searched the board and I can't find something similiar.
I'm trying to email a Report. I have built a button onto a form. I would
like users to open the report and view it. When the users close the report,
I have built a msgbox to display asking them if they want to email the
report. I have built this code in the Reports On Close.
My problem: The message box appears. I click Yes, I get an Action Failed
message. I click on Halt. It says "This action can not be carried out while
processing a form or report event.
How can I get this to go through so the document will be posted in my outlook?
Here is the code that I posted in.
Private Sub Report_Close()
Dim intResponse As Integer
Dim strPrompt As String
strPrompt = "Do you want to Email this Report?"
intResponse = MsgBox(strPrompt, vbYesNo, "Collections")
If intResponse = vbYes Then
DoCmd.SetWarnings False
DoCmd.RunMacro "Send to Outlook"
End If
End Sub
Thanks
AccessFitz
I've searched the board and I can't find something similiar.
I'm trying to email a Report. I have built a button onto a form. I would
like users to open the report and view it. When the users close the report,
I have built a msgbox to display asking them if they want to email the
report. I have built this code in the Reports On Close.
My problem: The message box appears. I click Yes, I get an Action Failed
message. I click on Halt. It says "This action can not be carried out while
processing a form or report event.
How can I get this to go through so the document will be posted in my outlook?
Here is the code that I posted in.
Private Sub Report_Close()
Dim intResponse As Integer
Dim strPrompt As String
strPrompt = "Do you want to Email this Report?"
intResponse = MsgBox(strPrompt, vbYesNo, "Collections")
If intResponse = vbYes Then
DoCmd.SetWarnings False
DoCmd.RunMacro "Send to Outlook"
End If
End Sub
Thanks
AccessFitz