Results 1 to 2 of 2

Thread: Checking If PDF Report is closed

  1. #1
    VBAX Newbie
    Jul 2020

    Checking If PDF Report is closed

    I have a listbox that the user goes through manually row by row. They check a few boxes where required and then click save. Amongst other updates, a report is created in pdf format and then closed. This works great and takes just a second or two. However, now and then, the report takes over 10 seconds to create a pdf. At this point, the user has moved on to the next row in the listbox. When this delay occurs, the pdf contains the wrong data (previous row data) because the report is still open. I need a way of only allowing the user to proceed, once the report is closed. However, this all happens in the background and so there is no event to alert me that the report has finished and is closed. Can anyone advise. thanks

  2. #2
    VBAX Guru
    Mar 2005
    You can use

    If Application.CurrentProject.AllReports(ReportName).IsLoaded = True Then

    in a function that you call.

    or you could open the report in print preview and have the user close it.

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