Solved

Creating PDF in Access 2013

Posted on 2014-12-09
4
438 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 84

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 84
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
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…

737 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