Why is my form not unloading when I code "Unload myfrm"??
Printable View
Why is my form not unloading when I code "Unload myfrm"??
to give an answer that is as specific as your question, the answer is "because".
You need to be more specific. For example, are you doing it inside an event handler in the form code?
Where do you have that code?
well.. from this thread: http://www.vbforums.com/showthread.p...hreadid=225576
maybe you have that Cancel = True in your query unload?
It's from within a command button's click event
OK then if BuggyProgrammer's suggestion isn't the reason, what is probably happening is that you are referring to some control on your form in the form's Unload event (or some code it calls). That will cause the form to reload. Set a breakpoint on the unload statement, step through the code and see what happens.
Using Unload Me will trigger the form_unload and form_queryunload, so it could have been called from heaven, it would still have been passed through those two events.Quote:
Originally posted by Jason Carden
It's from within a command button's click event