ReturnsRecords Property

Applies To   SQL-Specific query.

Description

You can use the ReturnsRecords property in an SQL pass-through query to specify whether the query returns records. For example, if your pass-through query is SELECT * FROM EMPLOYEES, you can set the ReturnsRecords property to Yes to display all employee records in the query's datasheet.

Note The ReturnsRecords property applies only to pass-through queries.

Setting

The ReturnsRecords property uses the following settings.

Setting

Description

Visual Basic

Yes

(Default) The query returns records (as a select query does).

True ( )

No

The query doesn't return records (as an action query does).

False (0)


You can set this property by using the query's property sheet or Visual Basic.

Tip You can access a pass-through query's ReturnsRecords property in Visual Basic, but the preferred method is to use the DAO ReturnsRecords property.

Remarks

A pass-through query can return records, or it can be used to change data, create a database object, or perform an action as an action query does.

When you set the ReturnsRecords property to Yes, you can use the pass-through query in another query or as the basis for a combo box, list box, form, or report. If you set the ReturnsRecords property to No, you can't use the query as the basis for an object or control because no records are returned.

See Also   LogMessages property, ODBCTimeout property, ODBCTimeout property ("DAO Language Reference"), ReturnsRecords property ("DAO Language Reference"), UniqueRecords property, UniqueValues property.