I have built a main form that includes controls to filter/search records from a subform based on a query. The query pulls data from multiple tables. I want to create another command button in the main form to export the filtered results from the subform to an excel spreadsheet. I have the following code but it pulls all of the data from the query, not the filtered results.
Private Sub cmdExcel_Click()
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "q_Server_Data", "c:\temp\test1.xls"
End sub
How can I change this to include only the data from the filter/search in the subform?
Thanks,
Jim
Private Sub cmdExcel_Click()
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "q_Server_Data", "c:\temp\test1.xls"
End sub
How can I change this to include only the data from the filter/search in the subform?
Thanks,
Jim