|
-
Aug 2nd, 2000, 03:21 PM
#1
Thread Starter
Member
Hi.
I am encountering a weird error in my program. I have 2 forms and each form has a command button. When I click the command button from Form1, Form2 will be loaded. If I click the command button from Form2, I am unloading the form (by Unload Form2 function). However, after that, it performs again the "Load" event of Form2. In this case, loading of form 2 is being done twice. Even if I am just loading form2
from the command button of form1.
What's the possible cause of this occurrence?
Thank you very much.
Regards,
-
Aug 2nd, 2000, 03:29 PM
#2
It's probably something in your code. Check and see if your code is similar to the following.
In Form1
Code:
Private Sub Command1_Click()
'Show Form2
Form2.Show
End Sub
In Form2
Code:
Private Sub Command1_Click()
'Unload Form2
Unload Form2
End Sub
-
Aug 2nd, 2000, 03:33 PM
#3
Thread Starter
Member
Hi Megatron.
You know what, I have the same code as what you post here.
That's why this is so weird for me.
Thanks,
-
Aug 2nd, 2000, 03:38 PM
#4
_______
<?>
just a thought..perhpas it is hanging in memory.
Form1 cmdbutton
unload form1
set form1 = nothing
load form2
form2.show
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Aug 2nd, 2000, 03:46 PM
#5
Thread Starter
Member
Thanks HeSaidJoe! I got it! I just set form2 to nothing in unload event of form2.
Thanks a lot.
Regards,
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|