ACC: Exporting a Parameter Query to a Spreadsheet or Text File (124514)
The information in this article applies to:
- Microsoft Access 1.0
- Microsoft Access 1.1
- Microsoft Access 2.0
This article was previously published under Q124514
Moderate: Requires basic macro, coding, and interoperability skills.
SUMMARY
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.
REFERENCES
For 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.
Modification Type: | Major | Last Reviewed: | 5/6/2003 |
---|
Keywords: | kberrmsg kbinfo kbusage KB124514 |
---|
|