Query.
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 ReturnRecords property to Yes to display all employee records in the query’s datasheet.
Note The ReturnsRecords property applies only to pass-through queries.
The ReturnsRecords property uses the following settings.
Setting |
Description |
Visual Basic |
Yes |
(Default) The query returns records (like a select query). |
True (-1) |
No |
The query doesn’t return records (like an action query). |
False (0) |
You can set this property in the query property sheet or in Visual Basic.
Tip You can access a pass-through query’s ReturnsRecords property in Visual Basic, but the preferred method is to use the data access ReturnsRecords property.
A pass-through query can return records, or it can be used to change data, create a database object, or perform an action like an action query.
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.
ReturnRecords Property (Microsoft Office 95 Data Access Reference).