473,320 Members | 2,088 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Code to find recordsets that are not closed

Can someone help me with creating code that will look for DAO recordsets in
modules and then check to see if the recordset is also closed in the module.

All of my recordsets are of the form rs* where * is a wildcard for letters
after rs.

Thanks.

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200611/1

Nov 12 '06 #1
4 2399
On Sun, 12 Nov 2006 07:24:38 GMT, "rdemyan via AccessMonster.com"
<u6836@uwewrote:

CurrentDB.Recordsets has the collection of open recordsets.
-Tom.

>Can someone help me with creating code that will look for DAO recordsets in
modules and then check to see if the recordset is also closed in the module.

All of my recordsets are of the form rs* where * is a wildcard for letters
after rs.

Thanks.
Nov 12 '06 #2
Tom:

So if I get this collection, I'm not clear how I can loop through the
collection and close any open recordsets. Can you provide some code to get
me started.

Thanks.

Tom van Stiphout wrote:
>CurrentDB.Recordsets has the collection of open recordsets.
-Tom.
>>Can someone help me with creating code that will look for DAO recordsets in
modules and then check to see if the recordset is also closed in the module.
[quoted text clipped - 3 lines]
>>
Thanks.
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200611/1

Nov 12 '06 #3
On Sun, 12 Nov 2006 17:19:11 GMT, "rdemyan via AccessMonster.com"
<u6836@uwewrote:

I was hoping you would find the Close method yourself ;-)

While CurrentDb.Recordsets.Count 0
CurrentDb.Recordsets(0).Close
Wend

Note that this code is better than:
For i = 0 to CurrentDb.RecordSets.Count -1
or similar constructs, because the Count will change each time you go
through the loop.

-Tom.

>Tom:

So if I get this collection, I'm not clear how I can loop through the
collection and close any open recordsets. Can you provide some code to get
me started.

Thanks.

Tom van Stiphout wrote:
>>CurrentDB.Recordsets has the collection of open recordsets.
-Tom.
>>>Can someone help me with creating code that will look for DAO recordsets in
modules and then check to see if the recordset is also closed in the module.
[quoted text clipped - 3 lines]
>>>
Thanks.
Nov 12 '06 #4
Thanks Tom.

I'm glad you mentioned the For/Next loop, because that is typically
how I would have coded it.

Tom van Stiphout wrote:
>I was hoping you would find the Close method yourself ;-)

While CurrentDb.Recordsets.Count 0
CurrentDb.Recordsets(0).Close
Wend

Note that this code is better than:
For i = 0 to CurrentDb.RecordSets.Count -1
or similar constructs, because the Count will change each time you go
through the loop.

-Tom.
>>Tom:
[quoted text clipped - 12 lines]
>>>>
Thanks.
--
Message posted via http://www.accessmonster.com

Nov 12 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: (Pete Cresswell) | last post by:
I posted this in the MS Access group, but no luck. ------------------------------------------ I've got another stored procedure in the same app that returns multiple recordsets and the code works....
6
by: Steve Jorgensen | last post by:
I keep having problems in which ADO disconnected recordset work under some circumstances, but lose all their data at other times, having no rows or fields, though the recordset object still exists....
41
by: Matt Alanzo | last post by:
Our SOHO 2 person compay sells furniture (not programmers). In '98 we paid $,$$$ for a VBA -Access '97 accounting application, including VBA source code .... an huge investment for us then (and...
1
by: Daveyk0 | last post by:
Hello there, I have a front end database that I have recently made very many changes to to allow off-line use. I keep copies of the databases on my hard drive and link to them rather than the...
2
by: CJM | last post by:
Is it sufficient to Set a Connection or Recordset to Nothing, or ought they specifically be closed first? E.g. Set rs = oConn.Execute(sSQL) 'Do stuff Set rs = Nothing
4
by: jason.awlt | last post by:
Greetings, I recently being bugged by the following error on my DB2. SQL0902C SQLSTATE = 58005 Reason Code = 14 This error comes out everytime i tried to insert some record to a table...
15
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to...
4
by: mrmagoo | last post by:
I'm building a vb.net Forms project that is getting data from a SQL Server database. One of the main goals of the project is to be really responsive to events, such as textbox change events. I...
239
by: Eigenvector | last post by:
My question is more generic, but it involves what I consider ANSI standard C and portability. I happen to be a system admin for multiple platforms and as such a lot of the applications that my...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.