Jim Dettman
jimdettman at earthlink.net
Sun Jan 30 10:09:41 CST 2005
Phil, The problem stems from the fact that Access doesn't know if it's been called as an automation server or not, so what is does is check references. If there are any open references when it goes to close, Access minimizes itself on the task bar assuming something is still going to happen. That's all well and good, but with Access and its interface to VBA, housekeeping and garbage cleanup are not one of its strong points. Quite often, dangling references are left and cause the problem you describe. As John said, make sure your closing any object you open and setting object variables to nothing. Beyond that, there was one Access but several revs back (A2K I think) that would cause this problem as well. A logical check like this: If (GetProcessFlag()) Then End If instead of: If GetProcessFlag() = True then End If in a subform would cause Access to hang. I've always used the latter so its never caused a problem for me, so I don't know if that bug is still in there or not. Killing references yourself usually takes care of things. I would do that first. Jim Dettman jimdettman at earthlink.net -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Phil Jewett Sent: Saturday, January 29, 2005 7:20 PM To: accessd at databaseadvisors.com Subject: [AccessD] ActiveX control keeps A2K from closing I added an ActiveX control to my A2K application and with it in the app Access will not close. (My app closes, but Access itself stays alive, and will not close for anything - I have to kill it with Task Manager.) Is this a known problem with some ActiveX controls, or is this just Access? Otherwise the application and the ActiveX control work fine, so I hate having to take it out, but Access not closing is a show-stopper. If it matters, the control is ESRI's ArcGIS MapControl control (not MapObjects, which is another of their products). I admit that ESRI does not say that the control works with Access, but they do give lots of VB6 samples. I get the same results when I open the app with Access 2002. Thanks in advance, Phil Jewett Phil Jewett Consulting pjewett at bayplace.com (619 318-4899 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com