Question : Access Report to PDF without Save As Dialog

I have an Access database that I have created a form where the user can check multiple reports and when I press a button I need it to export each as a PDF. Here's the catch. I want the user to be able to select a folder location on the form, and when the button is pressed I need code or a macro to specify the path and a new filename, and save each report respectively without prompting the "Save PDF As" dialog.

Example:
User puts a check next to rpt1 and rpt2, and enters s:\jobNumber\ in the path location.
they click the Create PDF Button
Each report is automatically created and saved as shown below without any additional interaction from the user:
 s:\jobNumber\RenamedReport1.pdf
s:\jobNumber\RenamedReport2.pdf

I do not want to modify registry entries or have to relly on outside .dll files to do this. There are shared databases that are used by multiple users, so the solution must be self contained...

Hopefully all that makes sense. Any ideas?

Answer : Access Report to PDF without Save As Dialog

DoeSmith,
1. You have asked a question that requires that you be familiar with VBA coding

2.
The you need to invest in one or the may "Convert to PDF" utilities that there are out there.
I use this:
http://www.lebans.com/reporttopdf.htm

3.
A multiselect Listbox is the more accepted method of doing this, because it require no modifications when reports are Added, Renames, Deleted, ...etc

4.
The problem with this is that a lot of users will simply type: C:\SomeFolder", forgetting the ending "\"
(thinking that is is presumed, or does not matter)
        c:\YourFolder
....is *Not* the same as:
        c:\YourFolder\
Entering "c:\YourFolder" will result in a file in the c: root folder named "YourFolderYourReportName.pdf"
So now (in addition to *everything* else), you must add validation for the ending "\".

Here is a fully functional sample.

You will have to modify it to work in your database.

You also must download the Dll from the link and install it into the same folder as the DB will reside in.
http://www.lebans.com/DownloadFiles/UpdatedDLLs.zip

Random Solutions  
 
programming4us programming4us