importing to temp table first

N

nerd19

i have 3 tables in excel that i need to import to access 2002. The
three excel tables all have different information but they all have at
least two fields of information that are similar: serial number and
size. This is what i need, only the two common fields for each of the
three tables. I want to import only those two fields from each excel
table to one table in access. So what i have found to do is to create
a temporary table for each and then do a select query to get the two
fields i need and finally append/update to the access table. I am
fairly new to access, just started using it 2 months ago, and i was
wondering if someone could help walk me through this, since the
programming is fairly advanced and hard to find exact information
on. Thanks for the help.
 
J

Jeff Boyce

One approach would be to link to the Excel files instead of importing them
(File | Get External... | Link ...).

Then create a query that returns only the two columns (fields) you need from
the first Excel "table" and append them to your permanent table.

Open the query in design view, change the Excel table the data is coming
from and append.

And one more time for the third Excel table.

If you want to automate this, you could create a macro that calls these
three queries. Note that you'd have to have the same Excel filenames each
time you ran the macro. Are the Excel filenames going to be different each
time?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
G

Guest

I don't see a problem with how you are doing this. The only thing I would do
differently would be to link to the Excel tables rather than import them to
temporary tables. Then have my append query copy the desired columns to my
Access table.
You ask about code, but you don't say what you want to do with it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top