Importing differently arranged data via common file dialog

pat_nospam

Registered User.
Local time
Today, 16:46
Joined
Oct 14, 2003
Messages
151
I'm looking to build a button on my app that will allow the user to select the file they wish to import via common file dialog, but that will also re-arrange the data each time into the correct order for the Access Table (from another differently arranged Access Table).

What's the best approach to this, the different arrangement will be the same everytime, but it will be different field order/names than the table it's being imported into.

Thanks in advance,

Pat
 
Usually I use an import table to import the data to, then use an append query to move it to the real table. If you want to complicate it, you can use a text ODBC driver, linked to your access DB, change the link in VBA each time they select a file then use a query to put it right in to the table, but I like to keep it simple usually.
 
Perfect -- now, I've got an append query ready to run, but I need to import just one table from the other Access DB. With the Common File Dialog, how can I select the database to import from and then have it only import "Table 1" instead of "Tables 1 - 13"

then, I'll run the append query once the table is successfully imported, then I'll delete the table we just imported with a "Drop Table" query.

Thanks again for the assist, an extra pair of "eyes" always helps :)

Pat


FoFa said:
Usually I use an import table to import the data to, then use an append query to move it to the real table. If you want to complicate it, you can use a text ODBC driver, linked to your access DB, change the link in VBA each time they select a file then use a query to put it right in to the table, but I like to keep it simple usually.
 
Try doing a search on Common File Dialog. There are tons of posts regarding it.

Once figuring that you should be able to select the database of your choice, and you can either create a listbox/combobox to query that databases list of tables using it's MSysObjects(SystemTable - Hidden) table.

Frank
 
Question - If it is another MSAccess DB, why not just LINK the tables and then use your append query on the linked tables?
 

Users who are viewing this thread

Back
Top Bottom