Access Report to PDF

Posted on 2009-12-23
Last Modified: 2012-05-08
Hi, I have been looking at Stephen Lebans great solution to creating password protected PDF's but am not a VBA expert and so have two questions I need to answer:

1: Can the save location of the PDF be specified by referencing a field on the form?
2: Can the name of the PDF be specified by referencing a field on the form?

I have attached Stephen Lebans database and the required dll files.

Many thanks
Question by:jonlake
    LVL 84

    Accepted Solution

    You can tell the function where to put your report by including the full path and name. The 3rd argument is where you'd specify this:

    ConvertReportToPDF(ReportName, vbNullString, Me.YourOutputPathField & "\" & Me.YourReportNameField, False, True)


    Author Comment

    Great, thanks for the help! Merry Xmas!

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
    Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
    In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now