Overwriting Tables in Access

  • Thread starter Thread starter Eve
  • Start date Start date
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
 
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 :-)
 
Are they matching records? That is, can you use
an update query instead of a Select ... Into query?

(david)
 
Back
Top