Terminate Event not Fired 
Author Message
 Terminate Event not Fired

I have a class module in Access 2000 project, which creates external com
object.
When the application starts I set a global variable = new this_class.
However when the Access quits, the terminate event for the class is never
fired, and I can't release the external com oject, which causes the
application to crash. Since Access does not expose Application.Quit event,
what would be the best solution to release the com object? I think I saw the
similar questions in this WG, and don't want to reinvent the wheel. Any
suggestions?

Thanks,

Alex.



Sun, 28 Nov 2004 02:41:38 GMT  
 Terminate Event not Fired
Probably the problem that your object couldnt be terminated, because you
keep reference to some other object. VBA should do this, but somethimes it
wouldnt
so after using your object you have to release all object variables in your
object and then set it to nothing

--
Alex Dybenko (MVP)
http://Alex.Dybenko.com


Quote:
> I have a class module in Access 2000 project, which creates external com
> object.
> When the application starts I set a global variable = new this_class.
> However when the Access quits, the terminate event for the class is never
> fired, and I can't release the external com oject, which causes the
> application to crash. Since Access does not expose Application.Quit event,
> what would be the best solution to release the com object? I think I saw
the
> similar questions in this WG, and don't want to reinvent the wheel. Any
> suggestions?

> Thanks,

> Alex.



Sun, 28 Nov 2004 03:26:11 GMT  
 Terminate Event not Fired
Thanks,

As I figured it out, it was a bug in inner object that crashed the
application. It did not crash VB client app, but in Access caused the memory
error.

Alex.


Quote:
> Probably the problem that your object couldnt be terminated, because you
> keep reference to some other object. VBA should do this, but somethimes it
> wouldnt
> so after using your object you have to release all object variables in
your
> object and then set it to nothing

> --
> Alex Dybenko (MVP)
> http://Alex.Dybenko.com



> > I have a class module in Access 2000 project, which creates external com
> > object.
> > When the application starts I set a global variable = new this_class.
> > However when the Access quits, the terminate event for the class is
never
> > fired, and I can't release the external com oject, which causes the
> > application to crash. Since Access does not expose Application.Quit
event,
> > what would be the best solution to release the com object? I think I saw
> the
> > similar questions in this WG, and don't want to reinvent the wheel. Any
> > suggestions?

> > Thanks,

> > Alex.



Sun, 28 Nov 2004 12:29:32 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Terminate Event Not Firing

2. Terminate Event Not Firing

3. terminate event not firing

4. Reply Inspector not firing terminate event???

5. Terminate Event on ActiveX user control not firing

6. ActiveX run mode terminate event does not fire

7. Terminate Event not firing until the Parent form is closed.

8. click event not firing if lost_focus is firing first

9. Terminate event won't fire after Unload

10. ReadProperties event and WriteProperties event are not firing

11. Terminate Event does not run for object in ActiveX DLL

12. Form does not see terminate event?

 

 
Powered by phpBB® Forum Software