I am exporting snaphot files on 1st of each month. I want each file i export to automatically insert the current date.
I have set the current date to a variable named DateTime and tried inserting this into my export string but it didn't like this... see below.... - DoCmd.OutputTo acOutputReport, "Employer Funding Report (By Employer)", "Snapshot Format", "c:\my documents\siobhan\testsnapshot"&DateTime&".snp"
Anyone have any other suggestions???
5 7536
I am exporting snaphot files on 1st of each month. I want each file i export to automatically insert the current date.
I have set the current date to a variable named DateTime and tried inserting this into my export string but it didn't like this... see below.... - DoCmd.OutputTo acOutputReport, "Employer Funding Report (By Employer)", "Snapshot Format", "c:\my documents\siobhan\testsnapshot"&DateTime&".snp"
Anyone have any other suggestions???
Try this: - DoCmd.OutputTo acOutputReport, "Employer Funding Report (By Employer)", acFormatSNP, "c:\my documents\siobhan\testsnapshot" & CStr(DateTime) & ".snp", False
It doesn't like it.....am getting a VB run-time error '2024'
"The report snapshot was not created because you don't have enough free disk space for temporary work files."
Yet when i run the simple.... - DoCmd.OutputTo acOutputReport, "Employer Funding Report (By Employer)", "Snapshot Format", "c:\my documents\siobhan\Employer Funding Report (By Employer).snp"
....it works.
I am the administrator of mp PC and i have plenty of free disk space on my c: drive.
I'm confused.....help!!
It doesn't like it.....am getting a VB run-time error '2024'
"The report snapshot was not created because you don't have enough free disk space for temporary work files."
Yet when i run the simple.... - DoCmd.OutputTo acOutputReport, "Employer Funding Report (By Employer)", "Snapshot Format", "c:\my documents\siobhan\Employer Funding Report (By Employer).snp"
....it works.
I am the administrator of mp PC and i have plenty of free disk space on my c: drive.
I'm confused.....help!!
do you have all of these directories set up on your computer:
"c:\my documents\siobhan\testsnapshot"
Try not having so many.....eliminate >>>>>\testsnapshot
Appending the date directly or as a string will add the slash characters (e.g. 12/02/08 for UK dates formatted as today). These are illegal in the filename and will cause an error.
Use this format instead to append the date without the slash characters, year first then month then day: Format$(Date, "yymmdd")
Stewart
Thanks!
As suggested the problem was in the format of the date. My fix was... - 'LOAD CURRENT DATE TO VARIABLE - IN FORMAT dd-mm-yyyy
-
Date1 = Format(Date, "dd-mm-yyyy")
-
-
'Save Report
-
DoCmd.OutputTo acOutputReport, "Employer Funding Report (By Employer)", acFormatSNP, "c:\my documents\siobhan\Employer Funding Report (By Employer)" & Date1 & ".snp"
Sign in to post your reply or Sign up for a free account.
Similar topics
by: deko |
last post by:
This code is behind a button that exports the contents of a query
("qryXL_Tx") to an Excel spreadsheet. It works fine the first time, but
will not run a second time. When I go to look at my...
|
by: Frank Barnhart |
last post by:
We have an application which runs Access under automation.
With Access 97, the app included this line to send a report to a text
file:
myAccessObject.DoCmd.OutputTo acOutputReport, ,...
|
by: Robert Langen |
last post by:
I'm calling an Access XP application from an Outlook XP appointment form.
Everything works, but the lines
DoCmd.OutputTo acOutputReport, "testreport", acFormatRTF, "c:\test.rtf",
False
Docmd.Quit...
|
by: tmountjr |
last post by:
I've got a user who's trying to export a text file with unicode
formatting. When he exports it as straight ascii, some of the foreign
characters (mostly just accent marks and the like - no...
|
by: Ryan |
last post by:
Hello. I was hoping that someone may be able to assist with an issue
that I am experiencing. I have created an Access DB which imports an
Excel File with a particular layout and field naming. ...
|
by: ljungers |
last post by:
I need to make some changes to a Query/select/print report using word application. What I need to do is change the way Word is called yet keep the process the same. Word is used so changes can be...
|
by: Simon |
last post by:
Dear reader,
With the DoCmd.OutputTo ...... you have the possibility to write a
report to an external location.
In case the external location is an existing file the DoCmd is not...
|
by: jmartmem |
last post by:
Greetings,
I have several Access 2007 reports that I regularly export to individual PDF flat files on a web server. I've successfuly created a module sub to export the reports using the...
|
by: g diddy |
last post by:
Hi, I have used the Docmd.outputto function in various places in my code but for some reason all code that comes afterwards, even msgbox doesn't show. I was just wondering if there is anything that...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |