TransferSpreadsheet

carlnewboult

Registered User.
Local time
Today, 10:14
Joined
Sep 27, 2005
Messages
90
Hiya,

Bit stuck here but bet it is really stupidly simple I have the following code to export a query into a spreadsheet which worked fine but after I added the path name which is in bold it no longer works.

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "NME With Company Code", C:\My Documents\TDL Update\(Format(Date, "mmmm")) & "'s TDL Information", True

what am i doing wrong what I am looking for it to export this to a specific folder in my documents.

Thanks in advance

:confused: :eek: :confused: :eek: :confused:
 
Try this:

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "NME With Company Code", "C:\My Documents\TDL Update\" & (Format(Date, "mmmm")) & "'s TDL Information.xls", True
 
Thanks a lot that has worked a treat
 

Users who are viewing this thread

Back
Top Bottom