Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2006
    Posts
    1

    How do you export a file with a unique file name

    I am attempting to use a macro to output a table in .csv format to a server each day. The macro has the ability to run each day but always saves under that same name. Is there a way to get a unique file name for each day it runs such as ..... File, File 1, File 2.
    Or even better File 09/25/06, File 09/26/06 etc....

    Thank you anyone for help!!

  2. #2
    Join Date
    Dec 2005
    Location
    Wilmington, DE - USA
    Posts
    275
    VBA code for something like this would be:

    Code:
    Sub DoTheExport()
    
        DoCmd.TransferText TransferType:=acExportDelim, TableName:="YourTable", _
            FileName:="c:\folder\subfolder\File " & Format(Now, "yyyy-mm-dd"), _
            HasFieldNames:=True
    
    End Sub

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Administrate MDW file in C#
    By dier in forum Access
    Replies: 0
    Last Post: 11-10-2008, 11:00 PM
  2. Browse for file
    By ccpine@comcast.net in forum Database Design
    Replies: 0
    Last Post: 08-24-2008, 10:12 AM
  3. Upload file inside .mdb database file
    By havish in forum Access
    Replies: 0
    Last Post: 07-30-2008, 07:35 AM
  4. Possible to export *.mdb file to *.exe file?
    By slpuiwan in forum Import/Export Data
    Replies: 1
    Last Post: 12-16-2007, 06:52 PM
  5. CSV File Import
    By compasst in forum Import/Export Data
    Replies: 3
    Last Post: 03-31-2006, 09:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums