TransferText File Name

G

Guest

Here's my dilemma:

I have a query that I need to ouput to a text file. I've gotten that much
to work using the transfertext action in a macro. Now, I would like for the
transfertext action to pick up a piece of data from the form to use in the
name of the file.

For instance:

An index is entered as 03-372. The query returns the records associated
with that index and the macro outputs that data to a text file. I want the
text file to be %my path%\03-372.txt.

Any suggestions?
 
K

Ken Snell \(MVP\)

Use an expression in the File Name argument of the macro:

="C:\TheFolder\" & Forms!FormName!TextBoxName & ".txt"
 
G

Guest

That's it. I tried that before, but either I forgot the equal sign or I had
incorrect syntax in the Forms!... call. Thanks for the help.
 

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