[AccessD] [SPAM SUSPECT] Error Trapping

Dan Waters dwaters at usinternet.com
Thu Aug 3 18:44:00 CDT 2006


Hey Steve!

I did not know this one!  Very clever . . . :-)

Dan Waters

-----Original Message-----
Subject: Re: [AccessD] [SPAM SUSPECT] Error Trapping

Dan,

Maybe you already know this but, just in case... One option is change
your subprocedure(s) into a function, returning a Boolean value.
Default it to return FALSE, by putting this near the top:
	MyFunction() = FALSE
On the very last line of the code, before the error handling section,
put:
	MyFunction() = TRUE
In the error handling section, make sure you insert a developer
controlled comment in the msgbox, like:
	"Error occurred in MyFunction"

Finally, on the parent procedure, call the subfunction with this:
	If MyFunction() = False then GoTo ex

In this way, you can always know at what level the error handling is
triggered, and gracefully shut down the calling context too.

Steve Capistrant




More information about the AccessD mailing list