It depends on the way you open recordsets.
"A Recordsets collection contains all open Recordset objects in a Connection or Database object."
You should save CurrentDB() into variable, in order not to loose info, since each call to it creates new Database reference.
Or declare something like this function that should replace all your CurrentDB() calls^
Public Function CurrDB() As Database
Static mCurrDb As Database
If mCurrDb Is Nothing Then
Set mCurrDb = CurrentDb
Debug.Print Now, "static mCurrDB inited for ", hWndAccessApp
End If
Set CurrDB = mCurrDb
End Function
and in code from Q:
Set rsMain = CurrDB().OpenRecordset(strSQL, dbOpenDynaset)
' ... create new record ....
'rsMain.Close '' not included, unfortunately
'Set rsMain = Nothing '' not included, unfortunately
and for debug output write function as:
Public Sub OpenedRST()
dim rst as DAO.Recordset
For each rst in CurrDB().Recordsets
debug.print rst.name
next rst
end sub