D
DChitwood
Last week I posted this question:
I've figured out how to create a macro that will export a
table to a .txt file using a static file name. However, I
need for the resulting .txt file to be different every
time. This macro will be used by a person whose ability
is pretty much limited to point, click, and fill in a pop-
up box or two. How can I write the macro so that it
prompts the user for a file name to which the table should
be exported?
Ken Snell kindly provided this answer:
DoCmd.TransferText acExportDelim, "Specification
Name", "TableQueryName", _
"PathToExportedFile" & InputBox("Enter the name of the
text ("".txt"")
file to be created:" _
,"Enter File Name") & ".txt"
I think I've put everything into the Create Macro boxes
properly. However, when I run it, I get an error
message: "Cannot update. Database or object is read-
only." The table that I am attempting to export is set to
Viewatasheet and DataMode:Edit. Any clue as to what
I've done wrong or should do differently?
I've figured out how to create a macro that will export a
table to a .txt file using a static file name. However, I
need for the resulting .txt file to be different every
time. This macro will be used by a person whose ability
is pretty much limited to point, click, and fill in a pop-
up box or two. How can I write the macro so that it
prompts the user for a file name to which the table should
be exported?
Ken Snell kindly provided this answer:
DoCmd.TransferText acExportDelim, "Specification
Name", "TableQueryName", _
"PathToExportedFile" & InputBox("Enter the name of the
text ("".txt"")
file to be created:" _
,"Enter File Name") & ".txt"
I think I've put everything into the Create Macro boxes
properly. However, when I run it, I get an error
message: "Cannot update. Database or object is read-
only." The table that I am attempting to export is set to
Viewatasheet and DataMode:Edit. Any clue as to what
I've done wrong or should do differently?