A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Docmd output to sample



 
 
Thread Tools Display Modes
  #1  
Old May 23rd, 2004, 08:16 AM
Stephen
external usenet poster
 
Posts: n/a
Default Docmd output to sample


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.
  #2  
Old May 23rd, 2004, 03:42 PM
fredg
external usenet poster
 
Posts: n/a
Default Docmd output to sample

On Sun, 23 May 2004 00:16:02 -0700, Stephen wrote:

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


--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
  #3  
Old May 23rd, 2004, 06:03 PM
Alp Bekisoglu
external usenet poster
 
Posts: n/a
Default Docmd output to sample

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

"fredg" wrote in message
...
On Sun, 23 May 2004 00:16:02 -0700, Stephen wrote:

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


--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.



  #4  
Old May 24th, 2004, 07:31 AM
Stephen
external usenet poster
 
Posts: n/a
Default Docmd output to sample


Dear Fredg.

Thank you so much, it works like magic. ^^
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:08 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.