Results 1 to 2 of 2
  1. #1
    mattniem is offline Novice
    Windows 10 Access 2016
    Join Date
    Oct 2019
    Posts
    1

    Error when printing reports to PDF using a batch file

    I have a function that called various reports and prints them to PDF, when I run the function manually, all reports are printed fine, however, when I use a batch file to call the function (this is the command: "C:\Program Files (x86)\Microsoft Office\root\Office16\MSACCESS.EXE" "C:\Users\admin\LearnMe\Trainer Support - Reports\Data\Greenbooks.accdb" /x Run_Greenbooks), the reports start to compile, but when it's a few pages into printing the report I receive a 'Windows Access has stopped working" error. The event is;
    Faulting application name: MSACCESS.EXE, version: 16.0.12026.20264, time stamp: 0x5d8bdda1


    Faulting module name: ntdll.dll, version: 10.0.14393.3241, time stamp: 0x5d786bcf
    Exception code: 0xc0000374
    Fault offset: 0x000d96a1
    Faulting process id: 0xfc4
    Faulting application start time: 0x01d57e254c2597b7
    Faulting application path: C:\Program Files (x86)\Microsoft Office\root\Office16\MSACCESS.EXE
    Faulting module path: C:\Windows\SYSTEM32\ntdll.dll
    Report Id: 4d1cd056-7a5d-4c71-bf3b-68372bc5e3e2
    Faulting package full name:
    Faulting package-relative application ID:

    Can anyone tell me the reason why the function works manually, but not while using a batch file?

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,799
    This isn't my area of expertise, but I figure after 74 views and no answer, what have you or I got to lose?
    Often this happens because Access cannot keep up with batch file processing. Maybe you terminate Access at the end but there's no way all the reports can print out before the termination is invoked. You didn't post much about the batch file code, so that's a big stab in the dark. If that's the case, then maybe move the closing of Access into the function rather than the bat file.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Cant run batch file from macro
    By tagteam in forum Access
    Replies: 1
    Last Post: 06-13-2019, 02:16 PM
  2. Batch Printing
    By mike23 in forum Forms
    Replies: 25
    Last Post: 04-15-2014, 03:38 PM
  3. Replies: 1
    Last Post: 04-25-2012, 01:46 PM
  4. Run batch file
    By shay in forum Access
    Replies: 3
    Last Post: 12-15-2010, 09:47 AM
  5. Running Batch File
    By NoiCe in forum Programming
    Replies: 2
    Last Post: 03-21-2010, 07:05 AM

Tags for this Thread

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