QueryDefs.Append method (DAO)

Applies to: Access 2013, Office 2013

Adds a new QueryDef to the QueryDefs collection.

Syntax

expression .Append(Object)

expression A variable that represents a QueryDefs object.

Parameters

Name

Required/optional

Data type

Description

Object

Required

Object

An object variable that represents the field being appended to the collection.

Remarks

The appended object becomes a persistent object, stored on disk, until you delete it by using the Delete method.

The addition of a new object occurs immediately, but you should use the Refresh method on any other collections that may be affected by changes to the database structure.

If the object you're appending isn't complete (such as when you haven't appended any Field objects to a Fields collection of an Index object before it's appended to an Indexes collection) or if the properties set in one or more subordinate objects are incorrect, using the Append method causes an error. For example, if you haven’t specified a field type and then try to append the Field object to the Fields collection in a TableDef object, using the Append method triggers a run-time error.