Save Filtered Report as an SNP file

G

Guest

I have a dialog form that allows the user to select the report they wish,
along with the criteria for the report, then they select a button to save it
as an .snp file. My questions is, how do I get that criteria passed to the
report before saving it as an .snp file?

I need to put a where clause, but where would I put it in this line of code?

DoCmd.OutputTo acOutputReport, RptName, "SnapshotFormat(*.snp)"

Thanks,
D.
 
A

Aaron Kempf

yeah bro you need to put it in the where clause

I always design my reports to do the logic on the database side-- instead of
in the parameters world
 
G

Guest

Yes, I realize I need to put in a where clause, but the question was, where
would I put it in the docmd.output line of code below.

Thanks.
 
T

Tony Toews [MVP]

D Collins said:
I have a dialog form that allows the user to select the report they wish,
along with the criteria for the report, then they select a button to save it
as an .snp file. My questions is, how do I get that criteria passed to the
report before saving it as an .snp file?

You can't. You need to apply the filter in the reports open event.

For a page on how to print a report for a single record and how to
generate reports to attach to emails see the Emailing reports as
attachments from Microsoft Access page at
http://www.granite.ab.ca/access/email/reportsasattachments.htm

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top