Appending records from an imported excel table

A

Aniko

Hi,
I would like to append records to an existing table from
an imported excel spreadsheet.
I found the macro Action "Transfer Spreadsheet" all
right, but I am not sure how to append these records from
the spreadsheet with the same macro to the existing table.
Your help is much appreciated.
Aniko
 
K

Ken Snell

TransferSpreadsheet will not add records to an existing spreadsheet. It will
create a new spreadsheet in the EXCEL file and put the records there. You'll
need to use Automation (use VBA code to open the EXCEL file and write a
recordset's contents into the appropriate cells on the existing sheet).

Or you may be able to use CopyFromRecordset Method in EXCEL (not in ACCESS)
to copy a recordset from ACCESS database into a specified range on an
existing sheet.
 
A

Aniko

Thanks Ken,
What I did was I used the Transfer Spreadsheet action to
get an excel spreadsheet into Access, which created a new
table.
But I could not find out how to have the records in this
new table to append to an existing table in Access
automatically.

But while waiting for reply, I kept reading the newsgroup
and found that if I create an append query, I can drag
this query into the macro and it will run the append
query after the Transfer Spreadsheet action.

This is a really good newsgroup, I am certain to visit
again when having problems.
Best regards,
Aniko
 
K

Ken Snell

My apologies....I've had way too many late nights and I musta been sleeping
when I read your post. I was 180 degrees from what you wanted to do.

I'm glad that you found an answer to your question. Next time, I will
endeavor to be awake when providing an answer!
 

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