ListParameters Method (Professional Edition Only)

See AlsovbmthListParametersSee                 ExamplevbmthListParametersEx>Low


Creates a Snapshot with one record for each parameter in a specified QueryDef object.


Set snapshot = querydef.ListParameters( )


The ListParameters method uses the following parts:

Part                 Description


snapshot          An object variableZ3R9Q5 of type Snapshot.

querydef           An object variable identifying an open QueryDef containing the parameters you want to list.


The records in the Snapshot are in the same order as the parameters in the specified QueryDef.  If the QueryDef has no parameters, the Snapshot will have no records.  The fields in the Snapshot are:

Field        Data type       Description


Name       String            Name of the parameter.

Type         Long              A number corresponding to the field data type.  See table below.


The values and symbolic constants (from DATACONS.TXT) for the Type field in the Snapshot are:

Constant               Value        Description


DB_BOOLEAN           1           True/False

DB_BYTE                  2           Byte

DB_INTEGER            3           Integer

DB_LONG                 4           Long

DB_CURRENCY        5           Currency

DB_SINGLE              6           Single

DB_DOUBLE             7           Double

DB_DATE                  8           Date/Time

DB_TEXT                  10          Text

DB_LONGBINARY     11          Long Binary

DB_MEMO                12          Memo


You can't use the Find methods, such as FindFirst, on a Snapshot created with ListParameters.  The Fields collection is not available in Snapshots created by the ListTables, ListFields, ListIndexes, and ListParameters methods; therefore, you can't access the field values using an index into the Fields collection.  To access the field values, you must explicitly use the name of each field.