Excel Spread sheet instead of report

gbanks

Registered User.
Local time
Today, 03:53
Joined
Feb 9, 2000
Messages
161
I have a query that I want to export as an excel spread sheet. I know how to do this manually but is the a process that would automate this. Thanks..
 
Try a button with code that looks like this:

sub excelexport

queryname = inputbox("What is the name of the query you want to import?")
filelocation = inputbox("Where do you wan to put the file (path/fielname)?")
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel4, queryname, filelocation, True

end sub
 

Users who are viewing this thread

Back
Top Bottom