Query to Excel

chrisguk

Registered User.
Local time
Today, 06:44
Joined
Mar 9, 2011
Messages
148
I have been trying to find a solution to export a query automatically from a command button to an Excel spreadsheet.

It doesnt have to be fancy just as long as I can name the workbook a name i want.

Any ideas?
 
Check out the OutputTo and TransferSpreadsheet methods. I'm not sure of the merits of each so you might want to try both to see which one works best.

hth
Chris
 
And just a side note here in case anyone seeing this thread has this issue. If you have memo fields and want to export - OutputTo and TransferSpreadsheet truncate the memo. So, I've found that exporting via code will work. If the CopyFromRecordset method doesn't work for you (I've had issues sometimes with Memo fields and it generating an error) you can export using the recordset and Excel automation but one line at a time.
 

Users who are viewing this thread

Back
Top Bottom