L
Lars Brownies
In a module I have a function that loops through a subform's recordset. The
recordset is set as follows:
Dim rs As DAO.Recordset
Set rs = Forms![frmMain]![subfrmHypLink].Form.Recordset
After the loop I don't explicitly close the recordset but in the the
Exit_Handler I have:
Set rs = Nothing
This works well. However, I read that I should explicitly close the
recordset after using it. So at the end of the function (before the
exit_handler) I've put rs.close.
The strange thing now is that the subform becomes unbound when the recordset
is closed. Can someone explain what goes wrong here and how to solve it?
Thanks,
Lars
recordset is set as follows:
Dim rs As DAO.Recordset
Set rs = Forms![frmMain]![subfrmHypLink].Form.Recordset
After the loop I don't explicitly close the recordset but in the the
Exit_Handler I have:
Set rs = Nothing
This works well. However, I read that I should explicitly close the
recordset after using it. So at the end of the function (before the
exit_handler) I've put rs.close.
The strange thing now is that the subform becomes unbound when the recordset
is closed. Can someone explain what goes wrong here and how to solve it?
Thanks,
Lars