Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form is not unloading

Status
Not open for further replies.

CFB

Programmer
Jan 11, 2001
74
US
When I call the release() method to close my form, the form does not unload properly. For some reason it is not running the unload() method after it runs the release() method. Anybody have any thoughts as to why my form wouldn't run it's unload() method? Thanks for the help.
 
do you have any code in the unload method, or perhaps just a stray space? If you do not have any code in the method, go to the property sheet, right ckick on the method name and select set to default.

 
I do have some code in the unload method. It closes tables and things such as that. Unfortunately, it doesn't even begin the unload method after I issue thisform.release(). I think I must have an object or something on the form which isn't getting released, so when the form is released it ends up staying open. I'm having a hard time figuring out which object it is though.
 
Shift the closing of tables etc. to forms destroy event from the unload event. This could solve the problem. ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
 
I tried closing all my tables through the destroy event, but that didn't seem to work. It's as though my form isn't getting past it's release method to destroy event and then onto the unload event. Something is preventing the form from releasing properly.
 
I think I've located the problem. I open a report up in preview mode with this statement:
report form myreport preview
When the user closes the preview of the form, the rest of the code is executed. I'm not sure exactly what the problem is, but when I comment out that line of code the form releases without a problem.
 
Scratch that last idea that I just posted. It seems to be related to a public array that I'm using. Ah well, back to the drawing board.
 
Put a DODEFAULT() in your relase method and set a breakpoint after the dodefault(), look now in the debugger if there are still some object remaining.

BTBW Is there some code in the qury unload event of your form, or its basevclass that might return .F. ??


HTH,
Weedz (Wietze Veld)
veld4663@exact.nl
The Netherlands

They cling emotionally to code and fix development rather than choosing practices based on analytical assesments of what works best.

After the GoldRush - Steve McConnell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top