Automate Import Process?

jguscs

Registered User.
Local time
Today, 06:52
Joined
Jun 23, 2003
Messages
148
Is it possible to automate the process of importing a MS Excel table into the database?
All of the answers to the choices given during the import process would be the same.
Example:
(Import)
Excel File (browsing to select file would be the only selectable option)
First Row always contains column headings.
(next)
Store Data In a New Table
(next)
don't change any field names
(next)
no primary key
(next)
Import to table name: (user select)
 
Excel import

In VBA, look up the transferspreedsheet method of the DoCmd action. It will allow you to do the import automatically. Now allowing the user to choose the file to import and allowing the user to decide the table to put the import requires more work. If you could look at the ACCESS 2000 DESKTOP DEVELOPER's HANDBOOK or the 2002 version, they have example code showing how to set up the file selection. Getz is one of the authors.
 
You can also find code for the Common Dialog API in the Microsoft knowledge base and possibly here.
 

Users who are viewing this thread

Back
Top Bottom