Importing Excel Data

AFD

New member
Local time
Today, 16:43
Joined
Jan 28, 2008
Messages
2
I am trying to import Excel data into an existing Access table. I keep my Excel spreadsheet in the same format as my Access table and when I import data that attaches at the end of my Acess table it works fine.

But I am now trying to import Excel data into the same existing table into rows that had cells left blank for entry later?
 
You need to use an UPDATe query, but you need to think about your process. On one hand you use this table to populate the table and on the other you want to Update fields in the table.

so you need to import (or LINK) the table to (or as) an intermediate table. you would then make 2 queries.

1. Append query copies records to your table and includes criteria to exclude those matching existing records ( so as not to duplicate)

2 Update query will update fields matching the records ( using an ID field)

you can automate this with Macro's/VBA, or if you don't think you need to just create it with an update query
 
MS Excel question

My question is how do I import Excel data into an already existing Access table within rows in the Acess table that have blank cells? Meaning I want to add excel data in the middle of an access table.
 
I tried to explain it, you need another table and run an update query.

I just made this query, it updates the lastname from the update table to the main table if the Lastname "is null".

UPDATE tblMain INNER JOIN tblUpdate ON tblMain.ID = tblUpdate.ID SET tblMain.lname = [tblUpdate]![lname]
WHERE (((tblMain.lname) Is Null));
 

Attachments

  • ScreenShot037.jpg
    ScreenShot037.jpg
    28.6 KB · Views: 166

Users who are viewing this thread

Back
Top Bottom