Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Jul 2005
    Location
    North Carolina, USA
    Posts
    195
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Hi! All;

    I'm doing this process manual at the moment, but would like to execute this with a VBA code. I need be able to export an access table as a .csv file extension. but the filename has to be the as YYYYMMDDHHMMSS. i.e. "export_20100610163400.csv" any ideas.

  2. #2
    5 Star Lounger AndrewKKWalker's Avatar
    Join Date
    Apr 2001
    Location
    Cambridge, UK
    Posts
    1,020
    Thanks
    0
    Thanked 3 Times in 3 Posts
    In VBA Assuming that it is delimited the command would be a variation of

    Docmd.TransferText acExportDelim,,"Name Of table to export","FilePath\export_" & Format(Now,"yyyymmhhnnss") & ".csv",True

    Where FilePath is the Path to the File Location e.g C:\BlahBlahBlah\

    If you are using a non standard CSV export you might need to set up a Spec File
    and use it as the 2nd argument of the Command between the ,,
    Andrew

  3. #3
    2 Star Lounger
    Join Date
    Jul 2005
    Location
    North Carolina, USA
    Posts
    195
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by AKW View Post
    In VBA Assuming that it is delimited the command would be a variation of

    Docmd.TransferText acExportDelim,,"Name Of table to export","FilePath\export_" & Format(Now,"yyyymmhhnnss") & ".csv",True

    Where FilePath is the Path to the File Location e.g C:\BlahBlahBlah\

    If you are using a non standard CSV export you might need to set up a Spec File
    and use it as the 2nd argument of the Command between the ,,
    Andrew, that worked perfectly!!! you are the best...what are you refering to a spec file? Just for my future reference

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •