M
MSP
I would like to be able to print reports to a pdf writer (and save to the
hard drive) using VB. I have written a report that delivers a large amount
of data that has to be broken apart and then each report emailed to the
individuals involved. I would like to run the report by individual then
either email the pdf directly to the indiviual or save the report to the hard
drive for later use.
I'm changing the recordsource on the fly using Reports!rptName.RecordSource
= NewSQL. I am also changing the caption using approximately the same method.
However, the only way I have been able to determine to print the report is
to use the Docmd.SelectObject followed by the DoCmd.Printout acPrintAll.
I've set the printer on the report to the pdf printer.
First of all, this method is very clumsy. The report has to be open to make
changes to the recordsource The big problem is when the DoCmd.PrintOut
command executes. I get the error message
Run-time error '3011':
The Microsoft Jet database engine could not find the object ". Make sure
the object exists and that you spell its name and path name correctly.
If anyone has a suggestion of a better way to do this, I would certainly
appreciate it.
hard drive) using VB. I have written a report that delivers a large amount
of data that has to be broken apart and then each report emailed to the
individuals involved. I would like to run the report by individual then
either email the pdf directly to the indiviual or save the report to the hard
drive for later use.
I'm changing the recordsource on the fly using Reports!rptName.RecordSource
= NewSQL. I am also changing the caption using approximately the same method.
However, the only way I have been able to determine to print the report is
to use the Docmd.SelectObject followed by the DoCmd.Printout acPrintAll.
I've set the printer on the report to the pdf printer.
First of all, this method is very clumsy. The report has to be open to make
changes to the recordsource The big problem is when the DoCmd.PrintOut
command executes. I get the error message
Run-time error '3011':
The Microsoft Jet database engine could not find the object ". Make sure
the object exists and that you spell its name and path name correctly.
If anyone has a suggestion of a better way to do this, I would certainly
appreciate it.