Macro-Transfertext-Filename using input from form

R

Rickm

I would like to use a Macro/Transfertext to import a csv file. It has a tree
associated with it: c:\Data\filename.csv I would like to substitute
filename with a textbox parameter from a form. Is there a special format
I must use or is there another way I must go? Thanks for the help!
 
B

Brian

Use this instead of the path & filename: [Forms]![NameOfForm]![NameOfTextBox]

This assumes that the form is open and that the control on the form contains
the entire path & file name.
 
R

Rickm

Brian,
This would make the user enter the complete tree name and file suffix every
time. Through some pain I came up with a format that works. In the Macro
where I select Transfertext as the action, I use the following arguments:
"c:\Data\" & [FORMS]![Formname]![TextboxName] & ".csv"
This allows the user to only type the filename and not worry about the tree
path (which is longer than I show above). They don't even have to put the
..csv on the end. I appreciate the option but I did manage to hit this one.
Perhaps you or someone else could benefit from this. Thanks again for the
reply!

Brian said:
Use this instead of the path & filename: [Forms]![NameOfForm]![NameOfTextBox]

This assumes that the form is open and that the control on the form contains
the entire path & file name.

Rickm said:
I would like to use a Macro/Transfertext to import a csv file. It has a tree
associated with it: c:\Data\filename.csv I would like to substitute
filename with a textbox parameter from a form. Is there a special format
I must use or is there another way I must go? Thanks for the help!
 
R

Rickm

Brian,
Actually, the Arguments in the other reply go in the Filename area of the
Argument listing just for clarification.

Brian said:
Use this instead of the path & filename: [Forms]![NameOfForm]![NameOfTextBox]

This assumes that the form is open and that the control on the form contains
the entire path & file name.

Rickm said:
I would like to use a Macro/Transfertext to import a csv file. It has a tree
associated with it: c:\Data\filename.csv I would like to substitute
filename with a textbox parameter from a form. Is there a special format
I must use or is there another way I must go? 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