none
[AC-2010] : random crash when I try to export a report in PDF RRS feed

  • Question

  • Hello,

    I developped a lot of applications in my company and I have a problem on only 1 of them.

    Firstable I used Access 2007 runtime until 1 month and I never had problems. So the problem appeared 1 month ago when I installed Access 2010 runtime on all computers (for different technical reasons I cannot use more recent version).

    On this application I export several reports in PDF and sometimes (not everytime) Access crashes when I run this command :

    DoCmd.OutputTo acReport, "ba1", acFormatPDF, adressefichier, True

    In event viewer I can see a problem with BEX / msvcr90.dll.

    2 PC use this application and I have the problem on the 2. On my PC (complete Access version) I have no problem. On these 2 PCs I have other applications that use the same command line and there is no problem.

    I tried all that for the moment without result :

    - repair Access

    - compact application

    - decompile / compile application

    - use accdb format (used format is mdb for the moment)

    - create a new empty database and import all objects

    - no problem if I open the report in preview mode

    - no problem if I open the report in preview mode and if I use the button save in PDF format in Access

    Of course I searched on the Web similar problems and even if I found a few problems I did not find anything interesting.

    Has somebody an idea ?

    Thanks in advance,

    Anthony A. 

    Friday, May 18, 2018 12:18 PM

All replies

  • Hi Anthony,

    When you installed the Access 2010 runtime, did you also install SP2?

    In other words, make sure you have the latest version of the Access 2010 runtime.

    Hope it helps...

    Friday, May 18, 2018 2:48 PM
  • Thank you for replying,

    Indeed I forgot to indicate it but PCs are up to date (SP2 and other minor updates).

    Anthony.

    Friday, May 18, 2018 3:17 PM
  • Do you have the following lines at the top of your code page where this call to pdf lives?

    Option Compare Database
    Option Explicit


    Just takes a click to give thanks for a helpful post or answer.
    Please vote “Helpful” or Mark as “Answer” as appropriate.
    Chris Ward
    Microsoft Community Contributor 2012

    • Proposed as answer by KCDW Tuesday, May 22, 2018 8:33 PM
    Friday, May 18, 2018 6:20 PM
  • So runtime will crash where a full license will throw an error.  That's just the way it is with runtime.

    You say it works fine on your full licensed PC.... so that leads me to ask: are all the PCs you test on linking to the same back end?  the reason for this question is that the cause could be the data itself....rather than the runtime version.

    The only other runtime-specific problem I have run into is that an older runtime version (2007) didn't know about features from a newer design master (2013)... so it worked on the full license (2013) but would crash on the runtime (2007)... I don't think this is your case given the output VBA is not new.... but I mention it just in case there's something you've left out....

    Saturday, May 19, 2018 1:51 PM
  • Hi AA16,

    Can you try to provide a sample data for which Access Run Time get crashed?

    We will try to check it and try to make a test on our side to find whether it produce the same result or not.

    Is there any specific change that you had notice when Access Run Time get crashed?

    If yes, You can inform us about it.

    It can be helpful to narrow down the issue.

    Temporary, You can move back to Access Run Time 2007 to avoid the crashing issue.

    Once you find the cause and solution, You can try to move to Access Run Time 2010.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, May 21, 2018 4:40 AM
    Moderator
  • Thank you all for replying.

    Sorry for delay, I did not work the last 3 days.

    I checked VBA code in the different objects used (forms and reports). Line option explicit was missing so I added it.

    There were a few error of declaration so I corrected that. Firstable I did that only on forms and after that the problem always occured. So I added option explicit on the reports : no declaration missing. I made a new try and for the moment I have no error.

    Deepak I did not make change in my code when I began to use Access Runtime 2010 instead of Access Runtime 2007. I don't want to go back to 2007 because Microsoft doesn't support it. It's the reason why I make that.

    Just a precision :  I use Access 2007 for developping, not 2010. I have got a license for 2016 version but not for 2010. Before installing Access runtime 2010 on computers I uninstalled   Access runtime 2007 and add-in Save As PDF for Microsoft office 2007 as for this version it wa

    Tuesday, May 22, 2018 10:01 AM
  • Thank you all for replying.

    Sorry for delay, I did not work the last 3 days.

    I checked VBA code in the different objects used (forms and reports). Line option explicit was missing so I added it.

    There were a few error of declaration so I corrected that. Firstable I did that only on forms and after that the problem always occured. So I added option explicit on the reports : no declaration missing. I made a new try and for the moment I have no error.

    Deepak I did not make change in my code when I began to use Access Runtime 2010 instead of Access Runtime 2007. I don't want to go back to 2007 because Microsoft doesn't support it. It's the reason why I updated Access.

    Just a precision :  I use Access 2007 for developping, not 2010. I have got a license for 2016 version but not for 2010. Before installing Access runtime 2010 on computers I uninstalled   Access runtime 2007 and add-in Save As PDF for Microsoft office 2007 as for this version it was not integrated like in Office 2010.

    Regards,

    Anthony.

    Tuesday, May 22, 2018 10:03 AM
  • So I added option explicit on the reports : no declaration missing. I made a new try and for the moment I have no error.

    Glad to hear you are no longer getting the error message. Since you have a license for 2016, you should develop in that version and download the most current runtime available for the end users.

    Just takes a click to give thanks for a helpful post or answer.
    Please vote “Helpful” or Mark as “Answer” as appropriate.
    Chris Ward
    Microsoft Community Contributor 2012

    Tuesday, May 22, 2018 8:32 PM
  • Hi AA16,

    You had mentioned that," I made a new try and for the moment I have no error."

    Is your issue solved?

    If yes, I suggest you to mark your own last post as an answer.

    It will help us to close this thread on our side.

    It will be also helpful for other community members who will have same kind of issues in future.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, May 23, 2018 5:35 AM
    Moderator
  • Hello,

    Finally problem is not solved, I had again the same error. Any other idea ?

    About using version 2016, I cannot. As indicated at the beginning for different technical reasons I cannot use more than version 2010 (and it is sure).

    Thanks in advance.

    Anthony.

    Wednesday, May 23, 2018 6:49 AM
  • Try changing your code line to

        DoCmd.OutputTo acOutputReport, "ba1", "PDFFormat(*.pdf)", "adressefichier", True, "", , acExportQualityPrint


    Just takes a click to give thanks for a helpful post or answer.
    Please vote “Helpful” or Mark as “Answer” as appropriate.
    Chris Ward
    Microsoft Community Contributor 2012

    Wednesday, May 23, 2018 6:56 PM
  • I just tried it but the problem is always here and always randomly :  error on 1st try, OK on 2nd and 3rd tries and error on 4th try.

    Friday, May 25, 2018 8:45 AM
  • Hi AA16,

    Try to check for any Office related or Windows related pending update.

    If you find any then try to install it and again try to reproduce the issue.

    It may help to solve the issue.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, May 28, 2018 9:14 AM
    Moderator
  • Hi Deepak,

    Thanks for replying.

    It was the 1st thing I checked and all updates have been already installed.

    Regards,

    Anthony.

    Monday, May 28, 2018 9:47 AM
  • Hi AA16,

    Are you available with any other machine with same configuration.

    If so, You can try to make a test on that machine and check whether that machine also has same issue or it work correctly there.

    It can help us to narrow down the issue and from that we can decide whether this issue is machine related or not.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, May 29, 2018 12:31 AM
    Moderator
  • Hi Deepak,

    Thanks again for replying.

    I have the same issue on 3 similar machines.

    Regards,

    Anthony.

    Tuesday, May 29, 2018 6:50 AM
  • You mentioned,

    "I use Access 2007 for developing, not 2010. I have got a license for 2016 version but not for 2010. Before installing Access runtime 2010 on computers I uninstalled   Access runtime 2007 and add-in Save As PDF for Microsoft office 2007 as for this version it was not integrated like in Office 2010."

    If the users are using Windows 10, the Microsoft print as pdf feature is already included and is supported in the Access runtime 2016. There may be a conflict between the runtime you have installed and Windows 10. Try using the most recent Runtime for Access instead of 2010. Unless you have a specific reason not to use the most current version.

    Also since you mentioned you have a license for Access 2016, there does not appear to be a reason not to develop in that version and then distribute the most current runtime with it.


    Just takes a click to give thanks for a helpful post or answer.
    Please vote “Helpful” or Mark as “Answer” as appropriate.
    Chris Ward
    Microsoft Community Contributor 2012

    Wednesday, May 30, 2018 7:17 PM
  • Hi Chris,

    Thanks for replying.

    I know that since Office 2010 print as pdf feature is included. On PC I had Access runtime 2010 but without add-in save as pdf. As Nothing is logical I tried also to reinstall this add-in but problem was always here.

    As already explained I cannot use more than Access 2010. Since Access 2013 it is not possible to use security function (login window). I can developp it but it is not the same thing. But the main reason is that I need to communicate with a specific software where I have an Access 95 database and the editor has no sourcing for it. and it is not possible to communicate with Access 2013 and more. I know that sometime I will have no choice but it cost around 30 000 € to developp again this software and we have no money for that yet.

    I would be the first to use Access 2016 if I could.

    If nobody knows how to solve my problem I think that the only solution is to use a workaround. I will not use automatic PDF exporting. I will use PDF Creator for manually save my reports in PDF format.

    Thanks again.

    Anthony.

    Thursday, May 31, 2018 7:12 AM