In an MS-Access form, I have the following code attached to an event:
Dim frm As Form, rs As Recordset
Set rs = Me.RecordsetClone
'do some stuff with rs
'
rs.Close
Set rs = Nothing
Set frm = Nothing
My question is: is the rs.Close required ? Is it even good (undesired side effects ?)
No, the close is not required, and the simple rule is if your code did not open the reocrdset, then you don’t want to close it. So, you only want/need to close things that you opended.
So, you are using a existing built in recordset, and you did not open that recordset. Setting both to nothing as you have is not required, but it can remain in place, and does show clear your intentions you done with the objects.