
Show vbModal, Me causes Stack Overflow...
The source of your problem is the forms modality.
First, you cannot display a non-modal form from a modal form.
Second (and probably your problem) is a little confusing, so let me TRY To
explain.
If I have a form (I will call it Primary) shown Modal, and on that form, I
have a command button to display a second form, then the second form
(Secondary) must be shown Modal. This is *Not* a problem. The problem is
that the code on the original Primary Form has opened the secondary form,
so since the secondary form is currently open, the code module in the
Primary form is really still executing. Now, where you will crash, is If
somebody trys to Open or show the primary form again. It really is already
loaded on the "Stack" so attempting to load it again Bombs miserably.
I hope I have not utterly confused you. If you can make sense of the
paragraph above, I think it will help explain the issues. I do not believe
you will find a solution while using Modal forms. The way to fix it, is
not to use modal forms unless absolutely necessary.
If you would like more Info, or if you would like to continue this thread,
email me directly...
Greg Jackson
PDX, OR
Quote:
> Dear all,
> I've used Show vbModal, Me in some situation... sometimes after
> executing this many times... VB will give me a "Stack Overflow",
sometimes
> it even crashs VB, or terminate my VB without any error message...
> Can anyone help me? Thanks.
> BTW, what is the different between Show vbModal, Me and Show vbModal?
I
> can understand for Show vbModeless, [OwnerForm], but not Show vbModal,
> [OwnerForm], thanks.
> Pigeon.