My only suggestions are to always close modular recordsets
in a Form_Unload procedure and close any Global databases
and set them to "Nothing"
See example coding below :-
Private Sub Form_Unload(Cancel As Integer)
mrsNames.Close 'Close modular recordset
gdbCustomerRecords.Close 'Close Global database
Set gdbCustomerRecords = Nothing
End Sub
That's what I have it done for my database currently. but there a so many recordsets that i have to close. I just want to know if anyone know of a better way of doing it, Like having a procedure that will close any recordset, any database connection.
Not knowing the complexity of your solution, I would still question the need for so many simultaneous DB connections, and open recordsets instantiated in memory.
Aside of that observation there is no standard way to dynamically close and destroy object in memory.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.