Mike,
I'm no guru but what I'd probably do is instead of issuing Me.Close(), I'd try to determine the form to close and issue frmMyForm.Close(). If the function is called from within a form, you might want to try to pass the form as a parameter.
Martin
~ * ~ * ~
Hello,
I have a module in my VB.NET app that I have a function with an error checking routine in. If I encounter an error, I want to issue a msgbox followed by closing the application. I can't issue a Me.Close in a module, however. I also can't return a boolean value like I usually do to handle this because I am already returning a dataset. Any guidance on this one? TIA!
-MAC
Shit happens!!!