Charlotte Foust
cfoust at infostatsystems.com
Mon Jan 31 10:17:59 CST 2005
The problem, which still exists as far as I know, was primarily associated with referring to a control as if it were a boolean value, i.e, If Me.Checkbox Then ... Or with handing a non-boolean return value as if it were a boolean. Wrapping Me.Checkbox or Me.GetValue() in parens forced its evaluation as a boolean, as did adding the explicit comparison. Otherwise, you have memory leaks. Charlotte Foust -----Original Message----- From: Jim Dettman [mailto:jimdettman at earthlink.net] Sent: Sunday, January 30, 2005 8:10 AM To: Access Developers discussion and problem solving Subject: RE: [AccessD] ActiveX control keeps A2K from closing 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 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com