Browse for file instead of modifying design every time

  • Thread starter Thread starter Marc M
  • Start date Start date
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?
 
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
 
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
 
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
 
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
 
Back
Top