Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Snapshot viewer

Status
Not open for further replies.

PeDa

Technical User
Oct 10, 2002
227
NL
How do I generate a Snapshot Viewer file of a report based on a programatically generated query (i.e. a report I can't just open in Preview mode and then choose File | Export ...). I now print these reports and distribute photocopies, but would now like te distribute them by e-mail (to my customers who don't have Access thenselves).


 
Hi
Have you checked out SendObject?
[tt]DoCmd.SendObject acSendReport, "Report1", acFormatSNP, "EMailTo", "CC", , "Email Subject", "MessageText", True[tt]
 
Hello Remou,

Yes indeed. My problem is: in the situation I describe, when should I envoke SendObject? My report only comes briefly into existence when I programatically set Me.RecordSource in the Report_Open event. Should I envoke SendObject in some report event?

Best wishes,

Peter D.
 
Sorry, reading was turned off, probably still is :) Here are a couple of ideas. If you can use Outlook, you can save your Snapshot and send it as an attachment.
If the query is being generated programmatically, can it be use to change the report, rather than putting it in the on open event? For example:
Code:
Set rpt = Reports("Report1")
With rpt
    .RecordSource = "MyQuery"
End With
DoCmd.Save acReport, "Report1"
 
DoCmd.OutputTo acOutputReport, "YourReport", acFormatSNP
 
The suggestion from dRahme is indeed the answer; thank you both.

Best wishes,
PeterD
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top