Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Oct 2002
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Add Data() to file name (XPSP-1)

    saving tbl to .txt w/

    DoCmd.TransferText acExportDelim, "", "tblPeerGroupAvgbankdata", "g:technology management teamstatisticspeer group avgqrPeerGroupAvgtogotobank & Date().txt", False, ""

    Want to include date at end of file name and cannot get it to work.

    TIA.

  2. #2
    Lounger
    Join Date
    Oct 2002
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Add Data() to file name (XPSP-1)

    Thank you sir.

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Add Data() to file name (XPSP-1)

    You can't have the Date function within the quotes; you must concatenate the fixed and variable parts. Furthermore, just specifying the date will probably spell trouble - a file name can't contain slashes. So you must provide a format that is valid in a file name. For instance, replace the name of the export file by:

    "g:technology management teamstatisticspeer group avgqrPeerGroupAvgtogotobank" & Format(Date, "ddmmyyyy") & ".txt"

Posting Permissions

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