TransferText

  • Thread starter Thread starter Stephen sjw_ost
  • Start date Start date
S

Stephen sjw_ost

Hello again,

I am trying to turn this code;
DoCmd.TransferText acExportFixed, "Excludes", "t_ACCT_NUMtemp", _

"\\nsusfla90ce01\cost$\OST\Procedures\Scrub_PrivateLabel\Exclusions\Excludes.txt", True, ""

into this code;
DoCmd.TransferText acExportFixed, "Excludes", "t_ACCT_NUMtemp", _

"\\nsusfla90ce01\cost$\OST\Procedures\Scrub_PrivateLabel\Exclusions\" &
"Excludes_" & Format(Date, "mmddyy") & ".txt"", True, """

but everytime I do I get an error msg;
"Cannot update. Database or object is read-only."

How can I make the output of my text file export the file name with todays
date in the file name? i.e. Excludes_102809.txt

Any help is greatly appreciated.
 
Hi,
perhaps name is too long. Anyway you can do this:

DoCmd.TransferText acExportFixed, "Excludes", "t_ACCT_NUMtemp", _

"\\nsusfla90ce01\cost$\OST\Procedures\Scrub_PrivateLabel\Exclusions\Excludes.txt",
True, ""

Name
"\\nsusfla90ce01\cost$\OST\Procedures\Scrub_PrivateLabel\Exclusions\Excludes.txt"
as "\\nsusfla90ce01\cost$\OST\Procedures\Scrub_PrivateLabel\Exclusions\" &
"Excludes_" & Format(Date, "mmddyy") & ".txt"",

BTW, too much double quotes here:

DoCmd.TransferText acExportFixed, "Excludes", "t_ACCT_NUMtemp", _
"\\nsusfla90ce01\cost$\OST\Procedures\Scrub_PrivateLabel\Exclusions\" &
"Excludes_" & Format(Date, "mmddyy") & ".txt"", True, """

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
 
Getting error;
Invalid procedure call or argument

Here is what I put;
DoCmd.TransferText acExportFixed, "Excludes", "t_ACCT_NUMtemp", _

"\\nsusfla90ce01\cost$\OST\Procedures\Scrub_PrivateLabel\Exclusions\Excludes.txt", True, ""

Name
"\\nsusfla90ce01\cost$\OST\Procedures\Scrub_PrivateLabel\Exclusions\Excludes.txt" As _
"\\nsusfla90ce01\cost$\OST\Procedures\Scrub_PrivateLabel\Exclusions\" &
"Excludes_" & Format(Date, "mmddyy") & ".txt"","
 
Try:
Name
"\\nsusfla90ce01\cost$\OST\Procedures\Scrub_PrivateLabel\Exclusions\Excludes.txt"
As _
"\\nsusfla90ce01\cost$\OST\Procedures\Scrub_PrivateLabel\Exclusions\" &
"Excludes_" & Format(Date, "mmddyy") & ".txt"

(remove extra "," at the end)

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
 
Back
Top