Navigation:  DAO Object Classes > DaoRecordset Class >

DaoRecordset:CopyQueryDef() Method

Previous pageReturn to chapter overviewNext page

Purpose

Returns a copy of the QueryDef that created the Recordset

 

Parameters

None

 

Returns

A QueryDef object

 

Remarks

You can use the CopyQueryDef method to create a new QueryDef that is a duplicate of the QueryDef used to create the Recordset.

 

If a QueryDef wasn't used to create this Recordset, an error occurs. You must first open a Recordset with the OpenRecordset method before using the CopyQueryDef method.

 

This method is useful when you create a Recordset object from a QueryDef, and pass the Recordset to a function, and the function must re-create the SQL equivalent of the query, for example, to modify it in some way.

 

Class

DaoRecordset