Exporting

  • Thread starter Thread starter JPaz
  • Start date Start date
J

JPaz

I need to export a table to a file where the filename has
the current date embedded in it.
Example...loc20030625.dat.
The software package that this file is going to be fed to
requires it.
I can export the table with a fixed file name using
the "Transfertext" macro.
 
I use the following code to embed the date when I export
to excel

Function Output_Receipts()

Dim file_name As String

file_name = "d:\data\inventory\receipts - " & Format(Now
(), "mmm") & " " & Day(Now) & " " & Year(Now) & ".xls"

DoCmd.TransferSpreadsheet acExport, 8, "Forecasted
Receipts 120 days", file_name, True, ""
 
Back
Top