Database Reference
In-Depth Information
Figure 17-11. The Print Statements script calls the subscript to which you've just added an Exit
Script step. Next, a comment helps you remember what's going on in the subscript, so you don't
have to open that script to figure it out. Then, an If test checks the results of the subscript to see
whether it should sort and print invoices. If no invoices need to be printed, a dialog box tells the
user what's happening, (or in this case, what's not happening).
Suppose you revisit this process later and want to add some more steps to the end of the
script that should happen last , every time the script runs—not just when records are found. If
your script looks like the one on top, you have a problem. You either have to add your new
steps to the script twice (once before the Exit Script , and again at the end of the script), or
reorganize the entire script to support the changes. But the script on the bottom is easy to fix:
Just add the new steps to the end. In general, if a script ends in more than one place, it will
come back to bite you later. You're much better off organizing your script so it always
reaches the same ending place.
Search WWH ::




Custom Search