Access 2003 - Macro Command - Export to Excel (1 Viewer)

krazykasper

Registered User.
Local time
Today, 15:02
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
 

Access_guy49

Registered User.
Local time
Today, 16:02
Joined
Sep 7, 2007
Messages
462
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

Top Bottom