Browse for file instead of modifying design every time

M

Marc M

Every month, I upload a text file with a different file name into a database.
This is done as a TransferText command within a macro. Every month, I need to
modify the Action Argumen called "File Name" to upload the appropriate file.
I would prefer that the macro allow me to browse for the file. Is there any
way to do this?
 
J

Jeff Boyce

Marc

Another approach to consider would be to create a form on which you provide
the path (or browse to it), then run your code/macro using the value on that
form. Note that the form must be open and the control filled with a valid
value...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
P

pietlinden

Every month, I upload a text file with a different file name into a database.
This is done as a TransferText command within a macro. Every month, I need to
modify the Action Argumen called "File Name" to upload the appropriate file.
I would prefer that the macro allow me to browse for the file. Is there any
way to do this?

use the OpenFile API from Access web.
it's the first one in the API section

www.mvps.org/access
 
M

Marc M

Jeff,

Thank you......I was hoping for a 30 second fix, but it might be time for me
to make this database more professional. I will start playing with forms and
modules.

Marc
 
M

Marc M

Thank you.......This is a little beyond me right now, but I will definitely
start figuring it out.....thank you especially for sending me to
mvps.org.....good to now that it is out there.

Marc
 

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