ACC: Exporting a Parameter Query to a Spreadsheet or Text FileLast reviewed: July 11, 1997Article ID: Q124514 |
The information in this article applies to:
SUMMARYModerate: Requires basic macro, coding, and interoperability skills. NOTE: The problem described below does not occur in Microsoft Access version 7.0. In version 7.0, exporting a parameter query causes the query to prompt for input in the same way it normally would. This article describes how to use the TransferText or TransferSpreadsheet action in a macro to export a parameter query. (A parameter query is a query that requires input in order to run.) You can export queries without parameters using the TransferText or TransferSpreadsheet macro action using the query's name for the action's Table Name argument. If you try to do this with a parameter query, however, you receive the following error message:
1 parameters were expected, but only 0 were supplied.To export a parameter query, you can eliminate the parameter from the query and instead pass it using an Access Basic function called in the query's Criteria row.
MORE INFORMATIONThe following example demonstrates how to export a parameter query:
REFERENCESFor more information about the TransferText macro action, search for "TransferText," and then "TransferText Action" using the Microsoft Access Help menu. For more information about the TransferSpreadsheet macro action, search for "TransferSpreadsheet," and then "TransferSpreadsheet Action" using the Microsoft Access Help menu. |
Keywords : kberrmsg kbusage QryParm
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |