Results 1 to 2 of 2
  1. #1
    EddieN1 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2011
    Posts
    313

    Interlacing Invoices and pdf Files

    I am running Access 2010 and want to print a batch of invoices using an Access Report. However, if an Invoice is marked with one or more associated pdf files(s), I want to close the Invoice Report, print the pdf file(s) and then restart the Access Report with the next set of Invoices. Only about one in ten Invoices will have an attachment, so I'll print a batch of about 10 Invoices, before I need to print any pdf file(s).

    I'm using the following ShellExecute command to print the pdf file(s):



    ShellExecute(0, "Print", strPathAndFilename, vbNullString, vbNullString, 0)

    The problem I'm getting is that the Access report for the subsequent batch of Invoices gets to the printer before the pdf files and, therefore, the documents are out of sequence. I am currently trying to put a ten second delay between the two, different tasks and that works most of the time. However, is there something I can test after the ShellExecute command to see when that is done before continuing to the next batch of Invoices?

    Thanks, Eddie

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    How are you starting/stopping the invoices? I'd probably be looping a recordset and printing each invoice individually, and printing the PDF as appropriate. I would expect the print spooler to keep them in order. I do that with a cover page/invoice combo and it works well, but those are separate Access reports rather than an outside PDF. I'd wonder if this would work in your situation:

    http://access.mvps.org/access/api/api0004.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Multiple Invoices from One Order
    By ryancgarrett in forum Access
    Replies: 9
    Last Post: 09-16-2015, 02:38 PM
  2. One order, multiple invoices
    By jerem in forum Database Design
    Replies: 24
    Last Post: 05-20-2014, 05:45 PM
  3. Multiple invoices attached single job
    By lpkorn423 in forum Reports
    Replies: 3
    Last Post: 07-18-2012, 12:30 PM
  4. How to create same monthly invoices automatically
    By snehal0909 in forum Database Design
    Replies: 1
    Last Post: 05-09-2012, 06:33 PM
  5. Printing Invoices
    By Alex Motilal in forum Reports
    Replies: 4
    Last Post: 05-11-2010, 01:20 AM

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