exporting to excel

J

Jim Hill

Hello,
I use "DoCmd.TransferSpreadsheet acExport, 8, myTable,
myFile, False, """ command in a module to export the table
to an excel file. In the table there is a date filed and
it is sorted by date but the file does not come up sorted
by date. How can I keep the same sort option while
exporting the data.
Thanks,
Jim.
 
C

Clinton

Try instead of myTable, use My Query.
SELECT * FROM myTable ORDER BY myDateFiled;
Clinton
 
J

Jim Hill

thw query is working but when I used it instead of table
name in DoCmd.TransferSpreadsheet it does not work. I
tried select statament instead of table name, it does not
work either.
Thanks,
Jim.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top