Export filtered records

  • Thread starter Thread starter linda
  • Start date Start date
L

linda

Hi,

I am trying to export certain records that have been filtered.
When I export it to excel, save the file and then reopen the file all
records are displayed in excel. I woul dlike only the records that I have
filtered to export from Access to Excel. Any suggestions?

Thanks
Linda
 
Hi,

I am trying to export certain records that have been filtered.
When I export it to excel, save the file and then reopen the file all
records are displayed in excel. I woul dlike only the records that I have
filtered to export from Access to Excel. Any suggestions?

Thanks
Linda

Exporting to Excel what? How? What version of Access?
The simplest method to export filtered records is to create a query
that contains just the records you want to export.
Then export the query data.

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9,
"QueryName", "C:\MyFolder\ASpreadsheet.xls", True
 
This is what my form does.
I have an active control (excel sheet). All records are loaded on Open
using a query. The user wil then use the filter feature on the excel sheet
to filter out their results. From this point on, I would like the user to
export the filtered info to Excel again from the active control. Once
outputted to Excel, the user must save the file. However, when you go to
open the saved file, all records are in the file rather than the filtered
output.

Linda
 
Back
Top