Query to re-arrange table contents

Here is a second valid exception. I also use GoTo Exit_MySub for exiting from the middle of a sub rather than directly having an Exit Sub buried in the middle of the code.

With only one Exit, the sub will always finish by completing any commands included there such as closing recordsets etc.

Even if there is no cleanup required I still exit this way. Otherwise later editions may include recordsets with the cleanup added at the end. An Exit Sub in the middle may go unnoticed.
 

Users who are viewing this thread

Back
Top Bottom