Results 1 to 3 of 3
  1. #1
    BobRich99 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Mar 2015
    Posts
    1

    PDF creation in VBA

    I have a front end ACCESS database at a clients location. One of the forms creates a PDF in VBA of a document using this code:



    DoCmd.OutputTo acOutputReport, "TicketCopy", acFormatPDF, FileName, False, , , acExportQualityPrint


    I have used this code many times and it works fine on my development environment here in Access 2007. One of the PC's at the client is running 2007 and this works fine on that PC. On another machine running Access 2010 it gets a run time error 2501 and bombs ( the error is trapped, but the pdf isn't created in the target folder)

    I cant find anything on how 2010 handles PDF creation differently then 2007

  2. #2
    Rawb is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Dec 2009
    Location
    Somewhere
    Posts
    875
    I have no problems creating PDFs in Access 2010 using the same method you show here. You can try removing everything after FileName and see if that helps (since those are all the default values anyway), but if that doesn't work, you may want to try reinstalling Access.

    Also, even though Access 2007 and 2010 are fairly close to each other, I don't recommend using different versions like that. Since you know Access 2007 works, I'd suggest you remove 2010 and install 2007 on the problem machine.

  3. #3
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    You also might check the references on the A2010 computer. See if there is a reference that says "Missing".

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

Similar Threads

  1. Replies: 8
    Last Post: 07-18-2013, 01:52 PM
  2. DVD Database Creation
    By Torani in forum Access
    Replies: 3
    Last Post: 01-11-2012, 06:28 PM
  3. Data re-creation
    By leobear in forum Queries
    Replies: 3
    Last Post: 01-08-2012, 12:32 AM
  4. Page creation
    By meliss421 in forum Access
    Replies: 6
    Last Post: 08-11-2011, 07:57 AM
  5. Will Pay $$$ for help w/ database creation!
    By eyesbryte in forum Access
    Replies: 1
    Last Post: 07-03-2006, 01:56 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