I have a form named "Search"
In it their is a combobox "cboEmp", which is used to filter the data and display in datasheet.
Now, the filter is working fantastic. The problem persists when Export button comes into picture.
On clicking Export, the filtered data should be exported to the excel.
what exactly is happening is, the data are getting exported in excel , BUT not the current filtered data.
to get the current filtered data I have to close the form and reopen it and then only the data will be fetched, which should not happen.
I don't know where I am going wrong.
Please check and suggest. :)
'This is the code I am using under OnClick event of Export button
Expand|Select|Wrap|Line Numbers
- DoCmd.OutputTo acOutputForm, "Tasks SubForm", acFormatXLS, "Tbl1XLS.xls", True