Interrupting a Report

When a program performs a long process like a loop, a report, or a database query, the lack of user interaction statements within the process can prevent the user from interrupting it. In this program, the preceding example is modified to display a form containing start, exit, and interrupt buttons, as well as a progress bar showing how close the report is to completion.

This figure is a screenshot of a form displayed to allow the user to monitor the progress of a long-running report and interrupt if needed.

Figure 1. Interrupting a report