Repost: Save filtered report as .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 in a where clause, but where would I put it in this line of
code?

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

Thanks,
 
G

Guest

Base your report on a query that includes criteria that looks to your open
form. For example, in query design view:

Field: LastName
Table: Employees
Sort:
Show:
Criteria: [Forms]![frmEmployees]![LastName]

If desired, you can include a text box in your report that reflects the
criteria chosen, using a similar method. The control source for the text box
would be something like this: =[Forms]![frmEmployees]![LastName]


Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 

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