Import multiple files

TJBernard

Registered User.
Local time
Today, 21:37
Joined
Mar 28, 2002
Messages
176
Has anyone here ever wrote code that could import multiple files (in this case .csv files) into different tables (in this instance 6 files, 6 different tables) and then set up the relationships correctly?

The database will contain the same queries, forms and reports. Just it will be used in different locations to imprort the same 6 .csv files. So I would basically copy the "shell" database (everything but the tables) for the users to their folder location. They could then import the 6 files into the tables, and the code would make this as easy as possible, plus establish the table relationships.

Just wondered if anyone had tried this, and if it is possible. I don't want to spend a few days working on something that is not even possible.

Thanks for your time.

T.J.
 
Outstanding Issue

If this issue is still outstanding then I have code that will do this for you.

What code does is creates a new database
Creates new tables
Creates fields within each table

Creates known relationships

You can then use the open XXX.csv for input as #1 to read the contents of the files (delimited or PS), and use rs.addnew to append lines into tables.

If the shell.mdb already exists then it is always wize to create relationships on empty tables first, as no validation is required.
 
Can you elaborate on that because i have the same problem? how to import different spreadsheets on different tables based on the file name of the spreadsheet..
 

Users who are viewing this thread

Back
Top Bottom