TransferText

G

Guest

I need to create a text file based upon a query and am using the following
command:

Dim stDocName As String
DoCmd.TransferText acExportDelim, , StDocName, "c:/directory/filename", -1

However, I would like to be able to define [FileName]
("c:/directory/filename") based upon an object on a form. Is this possible?
What is the correct syntax?

Thanks... Rod
 
G

Guest

It worked! Thanks for the quick response.

Arvin Meyer said:
Try somethink like:

Dim stDocName As String
Dim strFile As String

strFile = Me.txtMyTextBox & ".txt"

DoCmd.TransferText acExportDelim, , stDocName, "c:/directory/" &
strFile, -1
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access

Rod said:
I need to create a text file based upon a query and am using the following
command:

Dim stDocName As String
DoCmd.TransferText acExportDelim, , StDocName, "c:/directory/filename", -1

However, I would like to be able to define [FileName]
("c:/directory/filename") based upon an object on a form. Is this possible?
What is the correct syntax?

Thanks... Rod
 

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