• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Opening a Recordset

To create or open a recordset, Jet provides the OpenRecordset method. This method can be used on Database, TableDef, QueryDef, or existing Recordset objects. The syntax is:

SetRecSetVar = DatabaseVar.OpenRecordset _
(source[, type[, options]])

or:

SetRecSetVar = ObjectVar.OpenRecordset _
([type[, options]])

where:

  • ObjectVar points to an existing TableDef, QueryDef, or Recordset object.

  • When opening a recordset based upon a database (the first syntax), source is a string specifying the source of the records for the new recordset. The source can be a table name, a query name, or an SQL statement that returns records. For table-type Recordset objects, the source can only be a table name.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint