Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to: Access 2013, Office 2013
Closes an open Recordset.
expression .Close
expression A variable that represents a Recordset2 object.
If the Recordset object is already closed when you use Close, a run-time error occurs.
If you try to close a Connection object while it has any open Recordset objects, the Recordset objects will be closed and any pending updates or edits will be canceled. Similarly, if you try to close a Workspace object while it has any open Connection objects, those Connection objects will be closed, which will close their Recordset objects.
An alternative to the Close method is to set the value of an object variable to Nothing (Set dbsTemp = Nothing).