[AccessD] Test for Recordset Existence

Jim Lawrence accessd at shaw.ca
Tue Dec 26 11:30:30 CST 2006


Hi Dan:

I do not think you can test for all open recordsets. It is the programmer's
responsibility to keep track of what is opened or closed. 

The following code will check to see if a specific recordset is open and
close it:

If Not MyRecordset Is Nothing Then MyRecordset.Close: Set MyRecordset =
Nothing  

HTH
Jim

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dan Waters
Sent: Tuesday, December 26, 2006 9:03 AM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Test for Recordset Existence

During error handling, I want to test for the existence of a DAO recordset.
If the recordset has been set but not closed and set to nothing, then I want
to close it and set it to nothing.

How do I do this?


Thanks!
Dan Waters


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list