Send only one or two pages of a multi-page report.

Eljefegeneo

Still trying to learn
Local time
Yesterday, 22:44
Joined
Jan 10, 2011
Messages
902
Send only one or two pages of a multi-page report.
I have a report that has three pages. I only want to send the first two as a pdf file. Can this be done with VBA? I know it can be done using Exporting Data on the External Data ribbon, but how can I do it via VBA? Thanks.
 
There is a solution to this on the forum already. have a look here
 
Thanks, but, that really isn't what I want to do. I have a report (a contract) that is three pages long. In my current DB (DOS based DataEase), we have to print all three pages and send only two to the client. The pages are almost the same except for one or two lines at the bottom of the contract. So I replicated the report in Access 2010, and we now use PDF attachments to email the contract to the client. Ideally I could send the all three to accounting and only the first two to the client.

I thought that there might be something like the DoCmd.printout acPages command where you can select to print from page X to pay y, but can't seem to find anything in the DoCmd.SendObject (as PDF) or DoCmd.OutputTo acOutputReport, "", acFormatPDF, but specifying the pages like the DoCmd.printout command. In my quest to simplify things for the new Access user, I seem to be complicating things.

If there isn't a simple VBA command to do this, then I guess I will have to make two separate reports - in itself not a bad thing, but as a first time developer of an Access DB, I seem to have too many similar queries and reports.

Thanks for the reply. I do appreciated that someone actually takes the time to answer my questions.
 
Just realized that I was formatting the report entirely wrong. Report is actually just one page; I was trying to make to three pages long - only to have three different footers. So it is best to have three similar yet different reports. Thanks for your help.
 
And, if only the footer is different, I guess that you can reduce to only one report.
 

Users who are viewing this thread

Back
Top Bottom