I am trying to write a bit of code to output a range of records within a report to an excel format.
I have the code so that when u click a button, it will ask you where to save the file, but when you save it saves the whole report (130 pages).
The form has several controls to create a filter that will return the correct number of results, but I dont know how to apply it to the command to export as an excel sheet.
Currently the command is:
DoCmd.OutputTo acOutputReport, "PrintData"
I have a string called finalString that contains the correct filter. Is there any way to apply this filter to the report "PrintData" before exporting it to excel?
I have the code so that when u click a button, it will ask you where to save the file, but when you save it saves the whole report (130 pages).
The form has several controls to create a filter that will return the correct number of results, but I dont know how to apply it to the command to export as an excel sheet.
Currently the command is:
DoCmd.OutputTo acOutputReport, "PrintData"
I have a string called finalString that contains the correct filter. Is there any way to apply this filter to the report "PrintData" before exporting it to excel?