Hi, Stuart.
Dim rs As Object
Set rs = Me.RecordsetClone
These rs's are not closed.
You found the smoking gun. (There may be more, so don't get too excited.)
Should I
be putting close statements on the "rs-as-object"s? (the wizard that created
them didn't).
The Wizard didn't because the Wizard code was written for any possible mixed
environment of DAO and ADO libraries. The generic Object is "safe" in these
environments. I haven't seen your Wizard code that follows, but I would
guess that you could change:
Dim rs As Object
To:
Dim rs As DAO.Recordset
and set a Reference to the DAO 3.6 Object Library if it isn't already set.
Save the code and compile it.
Depending upon the code that follows, you may need to use ADODB.Recordset
instead. In that case, set a Reference to the ADO 2.x Object Library if it
isn't already set, save and compile.
Then you can add code to these procedures so that these Recordsets are
closed when they are no longer needed, then set the variable to Nothing
before the procedure ends. For example:
rs.Close
Set rs = Nothing
Exit Sub
ErrorHandler:
' Rest of code.
End Sub
HTH.
Gunny
See
http://www.QBuilt.com for all your database needs.
See
http://www.Access.QBuilt.com for Microsoft Access tips.
(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)
- - -
When you see correct answers to your question posted in Microsoft's Online
Community, please sign in to the Community and mark these posts as "Answers,"
so that all may benefit by filtering on "Answered questions" and quickly
finding the right answers to similar questions. Remember that questions
answered the quickest are often from those who have a history of rewarding
the contributors who have taken the time to answer questions correctly.