Solved

Creating PDF in Access 2013

Posted on 2014-12-09
4
454 Views
Last Modified: 2014-12-09
Creating a PDF with docmd.outputto acformatPDF works fine with MS Access 2013. However, and this is a mayor problem for me, it creates the exact same PDF after I mutated the record. It doesn't matter if I change the output name or even if I change to another record. The only way to get the right PDF is exit the database, starting it up again and creating the  PDF. Then the PDF is OK. If I then create another PDF, the first one keeps appearing. It is like it stays in the cache or something.

I use the same command line as everyone else:
    DoCmd.OutputTo acOutputReport, "ReportName", acFormatPDF, stndrdMap & stndrdFile, False

If I use docmd.SendObject acSendReport this works fine until I use OutputTo. Then SendObject has the same problem.

What can I do?
0
Comment
Question by:ErnstvanderHeijden
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 40488572
Can you show the full code? Generally there is more to the process, something like:

DoCmd.OpenReport "YourReport", , , "Where Clause", acHidden
DoCmd.OutputTo acOutputReport, "YourReport", acFormatPDF, "Output Path"
DoCmd.Close acReport, "YourReport"

Also, how are you setting the values of stndrdMap & stndrdFile?
0
 
LVL 85
ID: 40488576
Also, this is somewhat troubling:
If I use docmd.SendObject acSendReport this works fine until I use OutputTo. Then SendObject has the same problem
It's possible you have issues with the installation of Access on your machine. I'd suggest you insure that you have fully updated your Windows and Office installations, and that you've applied any relevant hotfixes.
0
 

Author Comment

by:ErnstvanderHeijden
ID: 40488602
Thank you so much for your answer. At first I was very sceptic about the way anyone could help me with this problem.

But you asked me for the rest of the code and that made me think. What if, as you sugested, the rest of code is the problem and not the line itself.

So I eliminated the rest of the code and changed the line:

    DoCmd.OutputTo acOutputReport, "Aanvraag", acFormatPDF, "C:\BaSIS\123467890.pdf", True

The problem was gone.

Thank you so much. I'm going to look now what made the problem rise.
0
 

Author Comment

by:ErnstvanderHeijden
ID: 40488626
The problem in code is this:
    Report_aanvraag.Logo.Picture = stndrdMap & "\BWBI.jpg"

When I delete this line from the code, everything works perfect. And I don't need to change the logo no more, so problem solved.

Once again, thank you very much.
0

Featured Post

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
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.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

624 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