PaulBarter
MIS
Is there any way of cancelling the loading of a form from its Form_Load procedure. Doing so seems to always give an error 364 "Object was unloaded".
Part of my program prints various information as requested.
My problem is that in the Form_Load procedure of Form2 (which does the printing) I am checking various print layout parameters, and if they are not defined, then calling another form (Form3) to define them. If on return from Form3 the parameters are still not defined, because the user has pressed a Cancel button, then I want to exit from Form2 as printing is not possible.
I have tried just using a
Unload Me
but it gives the avove error.
So how should I do this?
Part of my program prints various information as requested.
My problem is that in the Form_Load procedure of Form2 (which does the printing) I am checking various print layout parameters, and if they are not defined, then calling another form (Form3) to define them. If on return from Form3 the parameters are still not defined, because the user has pressed a Cancel button, then I want to exit from Form2 as printing is not possible.
I have tried just using a
Unload Me
but it gives the avove error.
So how should I do this?