R
rmcompute
I have a group of reports that I want to allow the user to print to Microsoft
Word programatically. In order to do this, I have to be able to dynamically
change the extraction criterion in the report. I am assuming with the
DoCmd.OutputTo command you cannot add extraction criterion, so I dynamically
created a query with this criterion and now have to dynamically change the
RecordSource property on the report. Is it possible to do that ? I tried:
Reports!rptBranchReport.RecordSource = qryBranchReport, but it said the
report had to be opened. Is there a way to accomplish this and then issue
the command below to extract the report to Microsoft Word ?
DoCmd.OutputTo acOutputReport, “rptBranchReportâ€, acFormatRTF,
“rptBranchReport.rtfâ€, False
Word programatically. In order to do this, I have to be able to dynamically
change the extraction criterion in the report. I am assuming with the
DoCmd.OutputTo command you cannot add extraction criterion, so I dynamically
created a query with this criterion and now have to dynamically change the
RecordSource property on the report. Is it possible to do that ? I tried:
Reports!rptBranchReport.RecordSource = qryBranchReport, but it said the
report had to be opened. Is there a way to accomplish this and then issue
the command below to extract the report to Microsoft Word ?
DoCmd.OutputTo acOutputReport, “rptBranchReportâ€, acFormatRTF,
“rptBranchReport.rtfâ€, False