PDA

View Full Version : Checking If PDF Report is closed



clayto63
07-01-2020, 05:40 AM
hi,
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

OBP
07-02-2020, 02:36 PM
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.