Results 1 to 11 of 11
  1. #1
    jmorse is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2011
    Posts
    11

    Setting up Stephen Lebans Report to PDF code

    Does anyone have the time to give me a quick step by step tutorial on how to set up Stephen Lebans code in my database to convert (1) report to pdf format and then save it using a button on a form? I am very new to VBA and Access as well. This is my first database and everything has come together so far. I appreciat your time and help.

    I am using Access 2003

  2. #2
    jmorse is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2011
    Posts
    11
    I figured it out

  3. #3
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    702
    Great job!

    You will be a VBA expert in no time.

    Thanks for the update.

  4. #4
    JimmySupport is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2012
    Posts
    4

    Leban's Report to PDF

    Wow, you are good...only took a little time to figure it out...I am still trying to set it up...can you clue me in on what to do?

  5. #5
    JimmySupport is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2012
    Posts
    4
    I have the module in the vb area of my data base - I have the two dlls in place, but now want to be able to make a button to call it into action...

  6. #6
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    702
    Quote Originally Posted by JimmySupport View Post
    I have the module in the vb area of my data base - I have the two dlls in place, but now want to be able to make a button to call it into action...
    To convert a report to a PDF you call the function ConvertReportToPDF() passing all the desired parameters.

    Have you looked at the example database that has the VBA code modules? The form in the example database has a form to show you how to call ConvertReportToPDF()

  7. #7
    JimmySupport is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2012
    Posts
    4

    Calling Leban's PDF maker

    I have looked at the sample...does that mean I have to have a list of reports as he does in order to call it? I am trying to use it to make pdfs of invoices and was trying to place a cmd button to do it...am I all wet?

  8. #8
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    702
    Quote Originally Posted by JimmySupport View Post
    I have looked at the sample...does that mean I have to have a list of reports as he does in order to call it? I am trying to use it to make pdfs of invoices and was trying to place a cmd button to do it...am I all wet?

    All the example uses the Listbox to get the name of the report. You can hard code the report name if that is what you need.


    Here is the example with the comments removed and the function changed to be hard coded with a specific report name.
    Code:
    Private Sub cmdReportToPDF_Click()
    
    Dim blRet As Boolean
    
    blRet = ConvertReportToPDF("Report_Name_Here", vbNullString,  "c:\Invoice.pdf", False, True, 0, "", "", 0, 0)
    
    
    End Sub
    In the above example you will need to substitute Report_Name_Here with the actual name of your access report.You will also need to change c:\Invoice.pdf to the desire full path name you want to use.

    That us it. Just to lines of VBA code.

    PS: What type of support do you do?

  9. #9
    JimmySupport is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2012
    Posts
    4
    LOL...what kind of support do I do? Well, it sure ain't VB or Access. I support about 187 web sites, and a number of individual and company computers and networks. This project is for a client, for whom I usually have the answer...but I just can't get a handle on this one. Tried to switch their database to 2007 ...not faring too well. I need to get this to work so I will have time to try another approach...going to try and do a cloud based database for them. I am going to try this again..will let you know what happens. Would be willing to pay someone to do this IF I could find them...I posted on JustAnswer..no takers yet.

  10. #10
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    702
    That is great. I do Access database development, training, and support.

    What version of Access is your client running?

    Access 2007 and later have the built in ability to create a PDF. I created this example showing how on my site here: Batch Printing and Save As PDF


    Quote Originally Posted by JimmySupport View Post
    Would be willing to pay someone to do this IF I could find them...I posted on JustAnswer..no takers yet.
    Well, I am willing help. I can probably get it working in 15 to 30 minutes.

  11. #11
    Stingaway is offline Efficiency Junkie
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2011
    Location
    The deep south. Keep going until you hit water basically.
    Posts
    224
    Another option if you have the report on the screen is just to set up the export to pdf/xps in the shortcut bar at the top of the screen...

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Setting Printer when Printing Report
    By russ0670 in forum Reports
    Replies: 3
    Last Post: 05-12-2010, 09:45 AM
  2. Replies: 8
    Last Post: 02-24-2010, 01:49 PM
  3. Setting a field in order for Report
    By cotri in forum Reports
    Replies: 2
    Last Post: 01-28-2010, 02:44 PM
  4. Replies: 1
    Last Post: 01-14-2010, 04:10 PM
  5. code to print just first page of a report
    By tonyrice in forum Reports
    Replies: 1
    Last Post: 02-14-2007, 03:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums