Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Browsing File Names for data Import

Status
Not open for further replies.

mbthaz

Technical User
Aug 29, 2002
44
US
I am using a function to import data from a daily excel spreadsheet into a database.
Function ImprtData()
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel97, "Usage", "H:\Data Collection\c+ usage", True
End Function

What I need to be able to do is select a file or multiple files from a 'file browser' and have the function use those names.

Any help greatly appreciated. I've ran through the help docs and can not seem to find the information I need.
 
You could use the code provided in the thread181-559152 to create a function to browse for the files that you wish. The code posted here works really well. Then in a looping routine one at a time, browse and select files and store the path and file name string in a table.

Then initiate the importing routine that will use the string path data in the table to perform the import that want.

This is one way to semi-automate the process.

Let me know if you need help setting this up.

Bob Scriver
Want the best answers? See FAQ181-2886
Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top