Criterial for the Exort.

  • Thread starter Thread starter sigh
  • Start date Start date
S

sigh

Hi,
I use this transferText method for my export with no
problem.
DoCmd.TransferText acExportFixed, "Report
Export", "qryReport", "C:\Name.txt"

But instead of always save as "Name.txt", I would like it
prompt me with "SAVE AS" Box. So, I can input the
different name everytime when I click on the export
command to export the file. How do I do that? What's vba
Code?

Any help would be very appreciate.
 
Build a form and add a textbox to it named txtFileName.
Then refer to the textbox in the TransferText code instead of a hardcoded
value.

DoCmd.TransferText acExportFixed, "Report Export", "qryReport", "C:\" &
Me![txtFileName]
 
ou indecate.
Thanks for the reply. But, after I change the code as
you indecate, I got a message as "Can not update. Database
or Object is read only" . How Come?
-----Original Message-----
Build a form and add a textbox to it named txtFileName.
Then refer to the textbox in the TransferText code instead of a hardcoded
value.

DoCmd.TransferText acExportFixed, "Report Export", "qryReport", "C:\" &
Me![txtFileName]

--
Joe Fallon
Access MVP



sigh said:
Hi,
I use this transferText method for my export with no
problem.
DoCmd.TransferText acExportFixed, "Report
Export", "qryReport", "C:\Name.txt"

But instead of always save as "Name.txt", I would like it
prompt me with "SAVE AS" Box. So, I can input the
different name everytime when I click on the export
command to export the file. How do I do that? What's vba
Code?

Any help would be very appreciate.


.
 
Back
Top