L
Leif
I've developed a report request form from which I can specify my filter
criteria and request a preview report or output as Excel. To provide a
filter for my report query I simply refer to the fields from the report
request form. That works fine.
To generate an Excel file I try to open the query as a recordset so that I
can write the information to Excel. However, since the query has references
to the report request form the recordset will not open.
I tried changing my query to add parameters to the query then open the query
for Excel by providing values to the parameters. This works OK.
However, this solution requires me to maintain two queries, one for the
report and one for Excel, returning the same data. Is there a solution so
that I only need to maintain one query instead of two?
Thanks,
Leif
criteria and request a preview report or output as Excel. To provide a
filter for my report query I simply refer to the fields from the report
request form. That works fine.
To generate an Excel file I try to open the query as a recordset so that I
can write the information to Excel. However, since the query has references
to the report request form the recordset will not open.
I tried changing my query to add parameters to the query then open the query
for Excel by providing values to the parameters. This works OK.
However, this solution requires me to maintain two queries, one for the
report and one for Excel, returning the same data. Is there a solution so
that I only need to maintain one query instead of two?
Thanks,
Leif