Hi, thanks in advance. My question has to do with Recordsets and Database.
Using DAO on the top of modules I set the record sets up with
Dim rs as recordset
Dim db as database
Dim Tdf as Tabledef
No problems.
Now as I understand it I should at the end of my modules or when I am finished using them I should set them to nothing
Set rs = nothing
Set db = nothing
Set tdf = nothing
My questions are:
1. Is there anything else that should be set to nothing? Such as all my dim statements?
dim strSql as string
set that to:
set strSql = Nothing
2. Should I close the rs and db prior to setting to nothing or does setting them to nothing do that for you?
3. Is there anything else along these lines I should know or do for good coding practice?
Thanks
Using DAO on the top of modules I set the record sets up with
Dim rs as recordset
Dim db as database
Dim Tdf as Tabledef
No problems.
Now as I understand it I should at the end of my modules or when I am finished using them I should set them to nothing
Set rs = nothing
Set db = nothing
Set tdf = nothing
My questions are:
1. Is there anything else that should be set to nothing? Such as all my dim statements?
dim strSql as string
set that to:
set strSql = Nothing
2. Should I close the rs and db prior to setting to nothing or does setting them to nothing do that for you?
3. Is there anything else along these lines I should know or do for good coding practice?
Thanks