Re: Date in file name
- From: catspajamas <catspajamas@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 12 May 2008 13:16:13 -0700
Use single quotes around the ddmmyyyy instead of double quotes.
"Agor" wrote:
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
"Steve Schapel" wrote:
Ftrujill0,
The syntax of your expression is incorrect, in a number of ways. Try
like this:
="C:\temp\" & Format(Date(),"mmddyyyy") & "_report.csv"
--
Steve Schapel, Microsoft Access MVP
ftrujill0 wrote:
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!
- Prev by Date: How can I format Excel Spread*** in OutpuTo Macro?
- Next by Date: Re: How can I format Excel Spread*** in OutpuTo Macro?
- Previous by thread: How can I format Excel Spread*** in OutpuTo Macro?
- Next by thread: Can i macro imports?
- Index(es):