G
Guest
I have an unbound main form (frmSearchDatabase) with a number of criteria and
a subform (fsubRecordSearch). The control source for the subform is a query
(qrySearchDatabase). The criteria is used to filter the query. What I need to
do is export the filtered results to Excel. I have created a button on the
mainform (cmdExcelExport) with a On Click event that links to a macro
(mcrExportExcel). The macro simply uses the OutputTo action and output format
of Excel.
My problem is that it does not export the filtered results of the query, but
the entire query. Or rather it exports the query as though no criteria was
selected, which unfortunatly results in ALL records being returned. (which is
what I want). How do I get the macro to ONLY EXPORT THE RESULTS OF THE
FILTERED QUERY?
Thanks!
a subform (fsubRecordSearch). The control source for the subform is a query
(qrySearchDatabase). The criteria is used to filter the query. What I need to
do is export the filtered results to Excel. I have created a button on the
mainform (cmdExcelExport) with a On Click event that links to a macro
(mcrExportExcel). The macro simply uses the OutputTo action and output format
of Excel.
My problem is that it does not export the filtered results of the query, but
the entire query. Or rather it exports the query as though no criteria was
selected, which unfortunatly results in ALL records being returned. (which is
what I want). How do I get the macro to ONLY EXPORT THE RESULTS OF THE
FILTERED QUERY?
Thanks!