This method closes a recordset.
Syntax
recordset.Close
Remarks
Use the Close method to close a recordset and free any associated system resources. However, closing an object does not remove it from memory; you can change its property settings and open it later. To eliminate an object from memory, set the Recordset object variable to Nothing.
Closing a Recordset object releases the associated data obtained through the Recordset object but does not affect the underlying database. You can call the Open method later to reopen the recordset with the same or modified attributes. You must close a recordset before changing the structure of the underlying database.
While the Recordset object is closed, calling any methods that require a current row generates an error. Trying to close a closed recordset also generates an error.
If an edit is in progress, calling the Close method generates an error; to avoid this error, call the Update or CancelUpdate method first.
If you use the Clone method to create copies of an open Recordset object, closing the original or a clone does not affect any of the other copies.
Example
The following code example shows how to close a Recordset object using the Close method.
Dim rs
Set rs = CreateObject("adoce.recordset")
rs.Open "myTable", "", 1, 3
rs.Close
Set rs = Nothing