Access 2003 - Macro Output File with current date

  • Thread starter Thread starter Cougarmutt
  • Start date Start date
C

Cougarmutt

There has to be a way to either set up a macro to use a %date% type field in
the Output File dialog, but I cannot figure out what it is.

Here is the scenario:

I have a macro that runs 44 seperate reports every morning and placed
the reports (.SNP format) into a specific directory on a server where they
can and are viewed. Downside, Access is wanting me to approve the OVERWRITE
of each file. I want it to automatically overwrite the old file.

Or better yet, I would like to actually write the file with the current date
and time, for example:

instead of writing the file as c:\dir1\file1.snp
I want it to be c:\dir1\file1_02192008_131505.snp

Or something similar.

ANY ASSISTANCE WOULD BE A LIFESAVER!!

Please..............
 
OH, when i attempt to use either single or double quotes in the OUTTPUT FILE
text box, the ERROR I get says that the report cannot be written because i do
not have enough disk space for temp file creation. If I put in the straight
file name, no fancy info (like date() or anything, and remove all quotes, it
writes fine. If I put the date() commend in with no quotes it write
C\dir1\file1_date().snp

as in that actual text date() and not the real date info.
 
Cougarmutt,

Try it like this:

="C:\dir1\file1_" & Format(Now(),"mmddyyyy\_hhnn") & ".snp"
 
Back
Top