TransferText

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.
 
A

Alex Dybenko

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
 
S

Stephen sjw_ost

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"","
 
A

Alex Dybenko

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

TransferTest 2
format 1 digit year 1
ahtCommonFileOpenSave 3
Export to File with Current Date 2
transfertext 12
Save AS Dialog. 1
Exporting a date field 2
TransferText command 3

Top