in my project
i have two forms
when i am redirecting from one form to other form ,
when i close second form ,i want to close the first form automatically
is there any option
thks
if i go from first form to next form,
when i close the second form ,i want to close the first form automatically
hope my question is clear
i used redirecting because when we jump from one form to another , we generally use "redirecting"
that all
thanks
put the code in Query_Unload(sorry if the name gets wrong some VB6 memories ) Event and verify a class level flag which indicate that you are going to another form or just closing it, if the case is first , open the form and let the processing continues.
now how to self trigger the operation, place the code
me.Unload
from where you want to jump from one form to another and also set the flag that the call from urs not by other source.
though not perfect but can solve your problem.
There are many tricky ways to achieve this. But if you want to close any other forms just by clicking a button (e.g btnExit) in frm2 for example, just put Application.Exit() at the end of the codes in btnExit.
Anyway, you can try this (modified from what JuggaloBrotha taught me once), add a code module to the project in the module:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.