Hale, Jim
Jim.Hale at FleetPride.com
Wed Oct 5 14:55:53 CDT 2005
I have a function that can use up to 14 recordsets but may use as few as three depending upon which case is selected.So I typically go For x = 1 To y If Not (rs(x) Is Nothing) Then rs(x).Close: Set rs(x) = Nothing Next x where y is the number of recordsets I actually opened. The problem is I have an Excel instance that refuses to die and the only thing I can figure is some dimensioned objects I never use still exist. Jim Hale -----Original Message----- From: Charlotte Foust [mailto:cfoust at infostatsystems.com] Sent: Wednesday, October 05, 2005 2:38 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Setting objects to nothing Strictly speaking, no you don't have to unless you use Set to instantiate the object. I think a better question would be why all those objects are being dimmed if they aren't going to be used. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bobby Heid Sent: Wednesday, October 05, 2005 12:31 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Setting objects to nothing I always do. Not sure if you have to if you did not use it. Bobby -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Hale, Jim Sent: Wednesday, October 05, 2005 3:09 PM To: 'Accessd (E-mail) Subject: [AccessD] Setting objects to nothing if an object is dimmed but not used (ie set) must it still be set to nothing when cleaning up? Ex dim rs(1 to 14) as recordset where only 5 recorsets are used in a given run. Jim Hale -- 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 *********************************************************************** The information transmitted is intended solely for the individual or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of or taking action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this email in error please contact the sender and delete the material from any computer. As a recipient of this email, you are responsible for screening its contents and the contents of any attachments for the presence of viruses. No liability is accepted for any damages caused by any virus transmitted by this email.