replace table with excel file

E

Emma

I would like to import data from excel into an existing table. However, I do
not want to append the data, as is done with the Docmd.Transferspreadsheet.
I would like to have the data I am currently importing, replace the old
table.
 
B

Brian

I am assuming that you do not want to replace the table (structure), but only
its contents (data). Run a delete query that deletes all the records from the
table before your run the import. This keeps the table structure intact, but
flushes the contents before the import.

DoCmd.OpenQuery "FlushThisTable"...
 
E

Emma

Worked Great Brian. Thank you,

Brian said:
I am assuming that you do not want to replace the table (structure), but only
its contents (data). Run a delete query that deletes all the records from the
table before your run the import. This keeps the table structure intact, but
flushes the contents before the import.

DoCmd.OpenQuery "FlushThisTable"...
 

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