By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,200 Members | 1,761 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,200 IT Pros & Developers. It's quick & easy.

Lebans ReportToPDF with criteria

P: n/a
Hi,

I'm using Stephen Lebans ReportTpPDF (thank you Stephen) and it's
great.

I've not changed the code at all, I invoke it using:

Call ConvertReportToPDF(Me.rptName, vbNullString, CurrentDBDir &
Me.rptTitle & ".pdf", False, False, 0, "", "", 0, 0)

Because of only wanting to print the report relevent to the current
record I've had to set the criteria [e.g. WHERE
(((tblJobs.JobID)=[Forms]![frmJobs]![JobID]))] in the report record
source, but I'd actually like to set the criteria in the
CallConvertReportToPDF(.........)

Can anyone advise on where to place the criteria in the call please? is
it possible?

Thanks

Jon

Sep 27 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Just open the report *first* with the restrictions...and *then* send to
pdf...

eg:

DoCmd.OpenReport strReportName, acViewPreview, , strWhere
Reports(strReportName).Visible = False

Call ConvertReportToPDF(strReportName, , strDocPDFName, False, False)

DoCmd.Close acReport, strReportName

*very* important to CLOSE the reprot after the above.....
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pl*****************@msn.com
Sep 28 '06 #2

P: n/a

Albert D. Kallal wrote:
Just open the report *first* with the restrictions...and *then* send to
pdf...

eg:

DoCmd.OpenReport strReportName, acViewPreview, , strWhere
Reports(strReportName).Visible = False

Call ConvertReportToPDF(strReportName, , strDocPDFName, False, False)

DoCmd.Close acReport, strReportName

*very* important to CLOSE the reprot after the above.....
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pl*****************@msn.com
Perfect (and annoyingly simple!!!) thank you Albert

Jon

Sep 29 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.