Access 2016 accde "DoCmd.OutputTo acOutputReport, , acFormatPDF..." crashes after 10 minutes

Create PDF in accdb is no problem.

Create PDF in accde crashes after 10 minutes.

Command: DoCmd.OutputTo acOutputReport, , acFormatPDF, strOutputFile, False, , , acExportQualityPrint

At first the DoCmd.OutputTo method runs fine.

But if you do 10 minutes nothing (only opened) and then you try to run DoCmd.OutputTo again, access crashes without error.

It seems like a timer-problem, but there is no timer.

Only by acFormatPDF and only with accde. In a accdb-file all is fine.

It is not a problem of the PDF-Software. I checked several PDF-Software-Products. Additional: Parameter Autostart is false.

So the PDF-Software should do no matter.

It is not a Problem of anti-virus-Software. I checked it also without any anti-virus-Software.

 

Question Info


Last updated August 21, 2019 Views 6,296 Applies to:

* Please try a lower page number.

* Please enter only numbers.

* Please try a lower page number.

* Please enter only numbers.

I have also had this problem.  It is very obscure, but repeatable.

4 people were helped by this reply

·

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

I have made the same kind of observations as NikolausM.  I have discovered that if the app sits idle for 7 minutes and 59 seconds or less, it is able to store the pdf within C:\Temp  .  If it sits idle for 8 minutes and 0 seconds or more, it cannot store the pdf within C:\Temp.  The application simply crashes without error during its attempt to convert the report to pdf, and store it. 

The time threshold's given are as measured from the moment the application is opened.  So, I have 7 minutes and 59 seconds from the time the application is opened to created and store the pdf, via DoCmd.OutputTo.  After that time, if I attempt it, the app crashes.

I am running Office Pro Plus 2016 (32 bit) on Windows 10(64 bit).  I am starting an accdb file from a bat file using START and a /runtime flag. 

In the Form_Open event handler of the applications Display Form , I ask to store the report as a pdf in C:\Temp.  But first, I have the code pause for a set number of seconds, an amount which I varied during my tests.

Here is a code sample that will give a good idea of how the test was done.

'**************************************
Within Display Form:

Private Sub Form_Open(Cancel As Integer)
    Const secondsToSleep As Long = 479
    
    testReportToPdfStorage secondsToSleep
End Sub


Public Sub testReportToPdfStorage(secondsToSleep As Long)
    Dim millisecToSleep As Long
    Dim fullPathToStoredFile As String
  
    millisecToSleep = secondsToSleep * 1000
    fullPathToStoredFile = "C:\Temp\" + "Statement-" & secondsToSleep & ".pdf"
   
    PauseExecution millisecToSleep        'a call to a subroutine within libPauseExecution
    DoCmd.OutputTo acOutputReport, "rptBillingStatement", acFormatPDF, fullPathToStoredFile, False, "", 0, acExportQualityPrint
End Sub


'**************************************
'libPauseExecution:  Not much to it

Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Public Sub PauseExecution(lngMilliseconds As Long)
    Sleep lngMilliseconds
End Sub

I have looked for clues as to cause in the Windows Event Log, but have found nothing.  In addition, I have done some studying of ProcessMonitor logs, but have come to no conclusion what might be causing this time dependent crash to occur.  This is a very repeatable problem.

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

The silent app crash observed isn't limited to calls to

     DoCmd.OutputTo  acOutputReport, "myReport", acFormatPDF ...

in vba code behind. 

Similar app crash behavior occurs when built in "report to pdf" export functionality is made use of from the access ribbon.  If too much time has occurred since the app was opened (say 10 minutes or more), an app crash occurs.

 

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

This is a very strange problem, the problem was the same with a runtime or full Access, no solution from Microsoft....

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

Hi Robert_Simard,

I am not clear whether you experienced this problem too?  Did you experience this problem? 

As far as a solution from Microsoft is concerned, I know of none, but I haven't searched much for a solution since March 29th since I'm developing an SSRS (Sql Server Reporting Services) workaround.

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

I'm sorry Robert.  I suppose I didn't answer your question about runtime or full access.  I am running my application in a full version of Access2016, that was a part of Office Pro Plus 2016 (32 bit), run on Windows10 (64bit) .

I am launching my accdb from a bat file using START and a /runtime flag... so perhaps it is sort of like using the runtime version of Access, though I actually have the full version. 

Hope this helps,

Alex R.

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

Hi Alex,

Yes, since I have replaced my Office 2007 and 2013 with Access 2013 all users who working with my application crash when trying to export to PDF (not always one time on two)

P.S Over 50 users have the same problem (windows 7 and Windows 10 too)

I have absolutely no idea about the solution and I find nothing about this problem on the Web...

Regards

Robert

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

From my side, all applications have an .addr extension.

20 users work in terminal server environment with Access 2016 runtime 32 bits  (Windows 2008 server R2) and the other users work locally with Access 2016 runtime 32 bits too and everybody have the same problem.

Probably I must uninstall runtime 2016 and reinstall 2013...

Thks

Robert Simard

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

Robert.  I do appreciate your getting back to me with more information on your particular situation. 

It really annoys me that I cannot find anything in the Windows Event Log corresponding to the crash.  As I mentioned in an earlier posting, I've considered reviewing ProcessMonitor logs, but am a bit overwhelmed by how many ProcessMonitor entries there are, even in the second in which the export to pdf goes from good to bad!   7min59 seconds good.  8min00 seconds bad!

I need to eventually transition all my reporting to SSRS, and so have decided to begin use of SSRS in response to this problem.

For you, your using Access2013, I gather, is a way to make the problem go away.  This is good.  I hope there is nothing preventing you from doing so.

I also haven't seen a solution on the web. 

Good day,

Alex

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

I - and many of my customers have exactly the same problem too.

This behavior occured since Office 2016/Access 2016 has been deployed. Before (with Office 2013/Access 2013) everything was fine, after upgrade to Office 2016/Access 2016 this behavior occur.

If you have Office 2016/Access 2016  and you also install the Access 2013 Runtime, and open your application with the Access 2013 Runtime, everything works perfect.

There must be a bug in Access 2016. I hope somebody of Microsoft will listen to this conversation - and solve the problem!

2 people were helped by this reply

·

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

* Please try a lower page number.

* Please enter only numbers.

* Please try a lower page number.

* Please enter only numbers.