PDA

View Full Version : Import from Excel



skennell
03-20-2007, 07:11 AM
I am developing a database where the users need to import data from another database or an excel spreadsheet. I would like to perform this through a coded VBA form. Different users may have different column headings in their excel spreadsheet. What is the best way to "match" the users column headings to the corresponding table field names in the database? Thank you in advance.

OBP
03-20-2007, 07:47 AM
skennel, I helped a previous poster (Violette Le Phan) put together a virtually identical requirement for Importing Excel spreadsheets in to Access.
The "Import Form" used 2 List boxes, the Excel Column names in one and the Access Table names in the other, allowing the user to "Select" the names that matched prior to "updating" the Table.
You are welcome to a copy of it.

skennell
03-20-2007, 10:34 AM
Thank you very much OBP, but I can't seem to find the attachment on her postings. Is it part of the MyAddress.zip. Thank you once again.

OBP
03-20-2007, 11:52 AM
Try this.

skennell
03-20-2007, 12:10 PM
It looks like exactly what I need. I will modify the code for my database, and I believe it will work fine. I can't thank you enough. Thanks again.

skennell
03-20-2007, 12:36 PM
Is there a form frmAddressIDs missing? Thanks. Sorry for the trouble!

OBP
03-20-2007, 12:41 PM
skennell, sorry for the brevity of my last response, my wife wnated to use the computer.
A lot of the code is not mine and over the months I have removed a lot of that in the Modules on other databases that I have used it in.

skennell
03-20-2007, 02:36 PM
Believe me, no apology necessary. I appreciate what you have given me. It will save me lots of time and energy. (I have already spent hours trying to figure it out on my own). I should be able to tie it together the way it is. Thanks again.