#  Other Applications & Softwares  > Access Tables & Databases >  >  How to overwrite data in a table on a new import.

## AlphaSkidz

I have a table within my access database that is updated daily (inventory levels).  Is it possible to have the data in the table deleted/overwritten each time a new import happens on the table?  I have tried deleting the data in the table, then doing an import on it (it works, but is timely). Also, I have done a fresh import and at the end named the table the same as the one I'm wanting to overwrite, but I get an error message saying "Can't overwrite table.".  Any suggestion?

----------


## alansidman

What I usually do is what you have indicated you already do.  Delete the data in the existing table and then import the new data.  Another possibility that may be faster:  Delete the existing table and then import to a new table.

What form is the new data coming in?  Is it an existing excel spreadsheet that is updated?  A new spreadsheet?  Some other source?

----------


## AlphaSkidz

The new data exists in a CSV file

----------


## alansidman

Is the csv file a new one every day or is it an existing one that is updated daily?

----------


## AlphaSkidz

It's typically a report that is ran each day and saved as a CSV.  We could have it stored on a network drive and that filed updated daily if that is the easier option for what solution you're working towards.

----------


## alansidman

Where I am going with this is if you have the same source file (your CSV file) updated daily, then instead of importing it to Access, Link it to Access and then it is always up to date.  A linked file acts just like a table if it is set up in a normalized manner.

Then you have no need to delete and import.

Alan

----------


## AlphaSkidz

That worked perfect!  One last question...There is another table in this database that will have data that we append daily to it.  To make Access look less like Access I have added 


```
Please Login or Register  to view this content.
```


 and unchecked Display Navigation Pane.  In doing this it makes it impossible to get to the external data tab and upload via CSV (even hot keys Alt + X + U doesn't work either).  Is there a way to add VBA to a button to get this functionality to work?

----------


## alansidman

Yes.  You can put a command button on one of your forms.  If you are updating the table by importing then look at the docmd.transferspreadsheet or docmd.transfertext depending on the source file.

----------

