Add Method (RecordsetDefs Collection)

See Also                  Applies To

Creates a new recordset definition. Returns a RecordsetDef object.

Syntax

expression.Add(SchemaRowsource, Name)

expression   An expression that returns a RecordsetDefs object.

SchemaRowsource   Required Variant. Specifies the schema row source that will be used to create the new recordset definition. This argument can be a SchemaRowsource object or the name of an existing schema row source.

Name   Optional Variant. Specifies the name of the new recordset definition. If you do not specify this argument, the new recordset definition has the same name as the schema row source specified by the SchemaRowsource argument; if necessary, numerals are automatically appended to the new name to make it unique.

Remarks

Using a single AddNew method call, you can create a recordset definition, page row source, and schema row source.