ReturnsRecords Property
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 | Visual Basic | Description |
---|---|---|
Yes | True | (Default) The query returns records (as a select query does). |
No | False | The query doesn't return records (as an action query does). |
You can set this property by using the query's property sheet or Visual Basic.
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.