how to name a text file with the current DATE() TIME() ?

G

Guest

I'm trying to export a txt file with the current date and time as the name of
the file, like "20061031_113015.txt" the name needs to reflect the new
date-time every time I send the command.
The data of the file will be base on a table that will be generate prior to
the exporting process.
The trigger will be in a control on a form in the "After Upadte" property.
Thank you for your help.
 
G

Guest

Create your file name in a variable and use that in the file name argument of
the TransferText.

strFileName = Format(Now(),"yyyymmdd_hhmmss.txt")
 
G

Guest

Thank you that worked just perfect.
How do I specify the path where the file will be create?
 

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

Top