If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Set report criteria in code?
Is it possible to set a reports criteria in code?
I am trying to use Stephen Lebans report-to-pdf tool, which uses the report as a parameter. I need to specify a criteria for the report, like I do when I open the report for printing: DoCmd.OpenReport strReportName, acViewNormal, , strReportParam I don't see how to set report criteria in the report-to-pdf tool, but if I can set the criteria before I use the tool, that should work. Thanks in advance for any help. Fred |
#2
|
|||
|
|||
Set report criteria in code?
I haven't used Stephens solution but you can always use a little DAO code to
dynamically change the SQL property of a saved query that feeds your report. -- Duane Hookom Microsoft Access MVP "Fredrated" wrote: Is it possible to set a reports criteria in code? I am trying to use Stephen Lebans report-to-pdf tool, which uses the report as a parameter. I need to specify a criteria for the report, like I do when I open the report for printing: DoCmd.OpenReport strReportName, acViewNormal, , strReportParam I don't see how to set report criteria in the report-to-pdf tool, but if I can set the criteria before I use the tool, that should work. Thanks in advance for any help. Fred |
#3
|
|||
|
|||
Set report criteria in code?
Fredrated wrote:
Is it possible to set a reports criteria in code? I am trying to use Stephen Lebans report-to-pdf tool, which uses the report as a parameter. I need to specify a criteria for the report, like I do when I open the report for printing: DoCmd.OpenReport strReportName, acViewNormal, , strReportParam I don't see how to set report criteria in the report-to-pdf tool, but if I can set the criteria before I use the tool, that should work. I've never actually done it, but I think the idea was to open the report in preview mode and then use Output or whatever to create the PDF. -- Marsh MVP [MS Access] |
Thread Tools | |
Display Modes | |
|
|