K
kaosyeti
i put this code in my close event of a report:
Private Sub Report_Close()
Dim msg, style, response As String
msg = "Do you want to email this report to John Doe?"
style = vbYesNo
On Error Resume Next
response = MsgBox(msg, style)
If response = vbYes Then
DoCmd.SendObject acSendReport, , acFormatSNP,
"(e-mail address removed)", , , "(subject)"
DoCmd.Restore
DoCmd.Close acForm, "formfinancelogreport"
Forms!formlauncher.Visible = True
Else
DoCmd.Restore
DoCmd.Close acForm, "formfinancelogreport"
Forms!formlauncher.Visible = True
End If
End Sub
it won't send the report for some reason. formfinancelogreport and
formlauncher are two forms that go visible=false when the report is opened.
it closes the report, closes the one form and sets visible to true on the
other (as it should). but no emails thus far. what am i missing?
Private Sub Report_Close()
Dim msg, style, response As String
msg = "Do you want to email this report to John Doe?"
style = vbYesNo
On Error Resume Next
response = MsgBox(msg, style)
If response = vbYes Then
DoCmd.SendObject acSendReport, , acFormatSNP,
"(e-mail address removed)", , , "(subject)"
DoCmd.Restore
DoCmd.Close acForm, "formfinancelogreport"
Forms!formlauncher.Visible = True
Else
DoCmd.Restore
DoCmd.Close acForm, "formfinancelogreport"
Forms!formlauncher.Visible = True
End If
End Sub
it won't send the report for some reason. formfinancelogreport and
formlauncher are two forms that go visible=false when the report is opened.
it closes the report, closes the one form and sets visible to true on the
other (as it should). but no emails thus far. what am i missing?