Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / April 2005

Tip: Looking for answers? Try searching our database.

Saving Date in File Name using TransferSpreadsheet

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Raj - 04 Apr 2005 18:03 GMT
I am trying to export using TansferSpreadsheet.  I have tried adding =format
(date)) but i save the fiel with "=form(date))" in the file name.  Can
someone tell me what I am doing wrong?
Thanks
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, _
"z- qmtblTeoco Control", "C:\Documents and Settings\rxchri3.AD\My Documents\
=format(Date()) &" _
& " TEOQRA" & [Forms]![choose report]![zcontrol] & ".xls", True
fredg - 04 Apr 2005 19:59 GMT
> I am trying to export using TansferSpreadsheet.  I have tried adding =format
> (date)) but i save the fiel with "=form(date))" in the file name.  Can
[quoted text clipped - 4 lines]
> =format(Date()) &" _
> & " TEOQRA" & [Forms]![choose report]![zcontrol] & ".xls", True

Format date how?
No = sign in the path.
Generic example:

"C:\FolderName1\FolderName2\" & Format(Date,"mm-dd-yyyy") &
"NameOfFile.xls"

Using your names:

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "z-
qmtblTeoco Control", "C:\Documents and Settings\rxchri3.AD\My
Documents\" & Format(Date, "mm-dd-yyyy") & " TEOQRA" & [Forms]![choose
report]![zcontrol] & ".xls"", True

Signature

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

Raj - 05 Apr 2005 14:41 GMT
Thank you Fredg..
I dont have one more question, i hope you might be able to help me with.  Is
it possible to change the Worksheet name also when you save it a spreadsheet?
Thanks
Raj

> > I am trying to export using TansferSpreadsheet.  I have tried adding =format
> > (date)) but i save the fiel with "=form(date))" in the file name.  Can
[quoted text clipped - 18 lines]
> Documents\" & Format(Date, "mm-dd-yyyy") & " TEOQRA" & [Forms]![choose
> report]![zcontrol] & ".xls"", True
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.