M
M Skabialka
My initial challenge was to find a way to put complex Access 2000 reports at
a location acsessible to a web site.
All of the Export to HTML, Export to Word, Excel, Snapshot features
seriously distorted the report which has very exacting requirements. Using
other code gleaned from experts on this site I learned to output to .emf
files but therse can't be viewed directly without being inserted into
something like PowerPoint, Word, etc.
Then it was suggested I use a PDF format, and using code written by Albert
D. Kallal was able to change the printer to the PDF converter as needed,
using the PDF995 PDF product, so solved half my problem.
http://www.attcanada.net/~kallal.msn/msaccess/msaccess.html
Here's the code I used using Albert's sample database:
' Thus, when printing a report, you can:
' 1) save the default printer into a string
strCurrentPtr = GetDefaultPrinter
' 2) switch to your report printer
strReportsPtr = "PDF995"
SetDefaultPrinter strReportsPtr
' 3) print report
DocName = "rptAcctSummary"
DoCmd.OpenReport DocName, acViewNormal '(There will be
criteria here)
' 4) switch back to the default printer
SetDefaultPrinter strCurrentPtr
Here's the other half of my problem:
I want to run the report about 150 times, each time using a different
account number, so each of the reports has to be named the account number;
eg 400034.pdf.
Since the actual report name in Access 2000 is rptAcctSummary, and PDF995
can either sequentially number the reports (1.pdf, 2.pdf) or call it
rptAcctSummary.pdf, or ask for a name and location every time it is run, how
can I make a batch run that will name these reports by the account number?
I will be using a loop based on a query of all active account numbers to run
each report.
So I need 100365.pdf, 114234.pdf, 400564.pdf, etc
Is there any more great wisdom out there which will help me complete my
project?
Thanks to all so far
Mich
a location acsessible to a web site.
All of the Export to HTML, Export to Word, Excel, Snapshot features
seriously distorted the report which has very exacting requirements. Using
other code gleaned from experts on this site I learned to output to .emf
files but therse can't be viewed directly without being inserted into
something like PowerPoint, Word, etc.
Then it was suggested I use a PDF format, and using code written by Albert
D. Kallal was able to change the printer to the PDF converter as needed,
using the PDF995 PDF product, so solved half my problem.
http://www.attcanada.net/~kallal.msn/msaccess/msaccess.html
Here's the code I used using Albert's sample database:
' Thus, when printing a report, you can:
' 1) save the default printer into a string
strCurrentPtr = GetDefaultPrinter
' 2) switch to your report printer
strReportsPtr = "PDF995"
SetDefaultPrinter strReportsPtr
' 3) print report
DocName = "rptAcctSummary"
DoCmd.OpenReport DocName, acViewNormal '(There will be
criteria here)
' 4) switch back to the default printer
SetDefaultPrinter strCurrentPtr
Here's the other half of my problem:
I want to run the report about 150 times, each time using a different
account number, so each of the reports has to be named the account number;
eg 400034.pdf.
Since the actual report name in Access 2000 is rptAcctSummary, and PDF995
can either sequentially number the reports (1.pdf, 2.pdf) or call it
rptAcctSummary.pdf, or ask for a name and location every time it is run, how
can I make a batch run that will name these reports by the account number?
I will be using a loop based on a query of all active account numbers to run
each report.
So I need 100365.pdf, 114234.pdf, 400564.pdf, etc
Is there any more great wisdom out there which will help me complete my
project?
Thanks to all so far
Mich