Re: Problem with Query Unload

From: JohnK (johnkeystone_at_noreply.net)
Date: 06/16/04


Date: Wed, 16 Jun 2004 16:25:07 +0200

The problem is the whole thing only appears in the compiled version, not in
the VB IDE.

John

"Larry Serflaten" <serflaten@usinternet.com> schreef in bericht
news:%23tezEu6UEHA.3512@TK2MSFTNGP12.phx.gbl...
>
> "JohnK" <johnkeystone@noreply.net> wrote
> > Thanks four your suggestion, Doug, but when I leave the End stmt out and
put
> > the cleanup code in the Unlaod procedure (I agree that's the right place
to
> > put it) and I press the controlbox OR the Close-button the app is now in
> > both cases still active.
> > Any other ideas?
>
> Have you stepped through the code to watch each command to see what it
> is doing? Somewhere in your clean up code, you may be accidently loading
> the form again, even though it never shows....
>
> Put the cursor on each of these lines:
>
> Private Sub Form_Load()
>
> And;
>
> Private Sub Form_Unload(Cancel As Integer)
>
>
> And press F9 to add breakpoints there (Line turns red by default).
> Then hit F5 twice and close your program. When it stops at
> Form_Unload, start hitting F8 to single step each command.
> Check to see that you stay in that procedure and do not
> somehow find yourself in Form_Load.
>
> If you do get to Form_Load then you've found out why it doesn't
> close properly. The line that executed just before you got there,
> caused the form to load again. You'll need to remove that line from
> the clean up process.....
>
> LFS
>
>

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.706 / Virus Database: 462 - Release Date: 14-6-2004