Access 2003 - Macro Command - Export to Excel

krazykasper

Registered User.
Local time
Today, 06:23
Joined
Feb 6, 2007
Messages
35
I'm using Access 2003.
I need to embed in my macro, a command to export the select query data to an Excel spreadsheet. Is there an action or something I can use to accomplishe that?
Thanks,

Krazy (Bill) Kasper
 
If you create a button to export, you can use this VBA code

dim stDocName as string
dim MyFile as string

stDocName = "qry_Name of your Select Qry to export"
MyFile = "The complete FilePath and File Name of the exported sheet"

DoCmd.TransferSpreadsheet acExport, , stDocName, MyFile
 

Users who are viewing this thread

Back
Top Bottom