Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Output To Macro changing file names

Status
Not open for further replies.

was1

Technical User
Aug 10, 2005
31
US
I'm not familiar with coding and hope it can be done without any.

I'd like to create a Macro that exports a query into an Excel spreadsheet. This Macro needs to be run daily so the file name needs to also add a date to the file name. I tried using "Output To" but didn't know how to modify the exported filename each time. I would like the user just to press a button and it will do everything.

Any help will greatly be appreciated.

 
For me, the simplest way is to use VBA playing with the DoCmd.OutputTo method and the Format and Date functions.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks, Is there a way to have it automated in a macro or a button?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top