Overwriting Tables in Access

E

Eve

I am in the process of putting together an access
database. One of my tables is comprised of data that will
be downloaded from another program on a fequent basis.
Ideally I would like to import the new data and have it
overwrite the data in the existing table in its entirety.
(This is due to the fact that I have links established
between this table and another.)
I can import the new data into the existing file but
that still leaves the old data in the file. Is there an
easy way for me to do this?

Thanks, Eve
 
G

George Nicholson

You would need to delete all the existing data either before or after the
import. AFAIK, there is no such thing as "overwriting" data.

You can do this with a Delete query or use a SQL string like the following
in VBA:

strSQL = "DELETE * FROM myTable"
DoCmd.RunSQL strSQL

Since * means All Records in this instance, so you would probably want to
use this BEFORE the import :)
 
D

david epsom dot com dot au

Are they matching records? That is, can you use
an update query instead of a Select ... Into query?

(david)
 

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