Date in file name

  • Thread starter Thread starter ftrujill0
  • Start date Start date
F

ftrujill0

I have a daily file that I need to import into access that uses the date and
file name (i.e. 02252008_report.csv) and was wondering if there is a way to
set up a macro that will use the current date and report name to import the
file into access?

I thought maybe using the transfer action and in the file name field trying
to use the following type of code but keep getting an error.

In the file name box:
c:\temp\format(date(), "mmddyyyy")&'report'.csv

thanks in advance!
 
Ftrujill0,

The syntax of your expression is incorrect, in a number of ways. Try
like this:

="C:\temp\" & Format(Date(),"mmddyyyy") & "_report.csv"
 
you rock Steve!!! Thank you.

Steve Schapel said:
Ftrujill0,

The syntax of your expression is incorrect, in a number of ways. Try
like this:

="C:\temp\" & Format(Date(),"mmddyyyy") & "_report.csv"
 
if there any way to use this to output a file from Access to Excel?

I'm am trying to automatically add todays date to file name of Access Table
that is exported into excel.

I tried using the syntax formula you supplied using both the Transfer and
Output to functions in Macro but they dont work.

(="C:\AccessReports\" & Format(Date(),"ddmmyyyy") & "_report.xls")

I tells me I have a syntax error in the visual basic module
I'm using Access 2002

thanks
 
Back
Top