Import Macro - File Location Prompt

S

seven_percent

I have an import macro which runs multiple instances of Transfer Text
on a fixed width flat file using specifications. There are 26
different specs, one for each table that I need the data imported into.
Using =InputBox("Enter the path and filename:") for the filename
works great, for ONE Transfer Text statement. However, all 25 other
transfer statements use the same file, just different specs and tables.
Is it possible to set a parameter in the beginning of the macro like:

myInputFileName = InputBox("Enter the path and filename:")

and then use myInputFileName for the remaining Transfer Text
statements?
 
S

Steve Schapel

Seven

On the form from which the macro is activated, put an unbound textbox,
where the user will enter the file path, before doing the imports. In
your macro, in the File Name argument, put a reference to the textbox,
using syntax such as
=[Forms]![NameOfForm]![NameOfTextbox].
 

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