exporting a table for a format txt

  • Thread starter Thread starter Frank Dulk
  • Start date Start date
F

Frank Dulk

I need to create a form of exporting a table for a format txt. I know that
can create a macro for that and tie I already did. Only that to macro
already defines the name of the file destiny, while I need that the user has
the option of typing the name of the file that will be generated by that
export, Jan2003.txt, Balancete.txt, for instance. Do I imagine then that she
can make that road some I modulate, once I found modules that copy or do
they move files, why some not to exist to name? Like this, it could export
the table with the fixed name for the same macro and to use that I modulate
to name for the name that the user wanted.
I know that that and a super task, but I believe that is not something
impossible.
I thank the attention
 
You need to know some VBA to solution this. The MS
example is:
DoCmd.OutputTo acOutputTable, "Employees",
acFormatTXT, "C:\Employee.txt", True

this exports the table Employees to text file called
Employee.txt to the root of the C drive. You can
dynamically create the file name and path for the export
but you have to undestand VBA to gether the values from
the user and then concatenate these values to create the
file name and path.

the True statement at the end of this code opens the newly
created file
 
Back
Top