OutputTo command for Snapshot

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Question: How would I write the code for the "OutputTo" statement to send a
report as a snapshot format? I know when you create a macro in Access (I'm
using 97) the option is there to create in snapshot format. But in actual
code, the format is not given. Is there a way to do this?
 
DoCmd.OutputTo acReport, "NameOfReportYouWantToExport",
"SnapshotFormat(*.snp)", "FullPathWhereFileWillBeSavedTo", False, ""

(The False at the end is to not open the snapshot viewer, change to True if
you want to preview it)
 
MCyn said:
Question: How would I write the code for the "OutputTo" statement to
send a report as a snapshot format? I know when you create a macro in
Access (I'm using 97) the option is there to create in snapshot
format. But in actual code, the format is not given. Is there a way
to do this?

DoCmd.OutputTo acOutputReport,"ReportName","Snapshot Format","FilePath"
 
SusanV, thank you so much...that worked perfectly, I actually had that as my
code, but was leaving out the quotation marks around the
SNAPSHOTFORMAT(*.SNP). Now it works...thanks again!
 
Basically its just using the DoCmd.OpenReport statement and using the
appropriate options. The VBA code window should give you the assorted
arguments for OpenReport and the appropriate values needed.
 
I NEED SIMILAR HELP...PLEASE SEE BELOW...MY QUESTION IN CAPS.

David C. Holley said:
Basically its just using the DoCmd.OpenReport statement and using the
appropriate options. The VBA code window should give you the assorted
arguments for OpenReport and the appropriate values needed.

I HAVE A FORM WHERE THE USER CLICKS ON A BUTTON, WHICH RETURNS TO HIM A
PRINT PREVIEW OF A REPORT...I'D LIKE FOR HIM TO THEN HAVE THE CHOICE OF
SENDING THE OUTPUT OF THAT PREVIEWED REPORT TO A SNAPSHOT FILE. I TRIED TO
FOLLOW THE IDEA OF CREATING A MACRO, BUT I DON'T REALLY FOLLOW THAT...I
TRIED, BUT CAN'T FIGURE OUT HOW TO CREATE THE MACRO...I VIEW MY CODE FOR THE
BUTTON AND SEE WHERE THE DOCMD.OPENREPORT "WHATEVER", ACPREVIEW LINE IS, BUT
I DON'T KNOW HOW TO INCORPORATE THE DO.CMD.OUTPUTTO ACOUTPUTREPORT,
"WHATEVER", "SNAPSHOT FORMAT", "FILEPATH" TO GIVE THE USER THE OPTION TO SEND
THE PREVIEWED REPORT TO A SNAPSHOT.
 
Back
Top