Docmd output to sample

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, all

Can anyone help me how to export reports to excel files and name them as creation date such as 05232004? I had tried Access help, but it didn't show me any sample code how to use docmd.outputto code

Please help.
 
Hi, all.

Can anyone help me how to export reports to excel files and name
them as creation date such as 05232004? I had tried Access help,
but it didn't show me any sample code how to use docmd.outputto
code.

Please help.

DoCmd.OutputTo acOutputReport, "ReportName", acFormatXLS,
"c:\YourFolderName\" & Format(Date, "mmddyyyy") & ".xls"

File name today would be
05232004.xls
 
Hi Stephen,

Sorry to jump in but have a suggestion for ease of use/locating/sorting:
I would rather use "yyyymmdd" as the format. You will find it much easier
and better to locate afterwards.

Alp
 
Back
Top