Import new data and replace old data in Access table.

  • Thread starter Thread starter TBui
  • Start date Start date
T

TBui

I try to import new data (from Excel) into an existing Access table. However,
Access only allow me to either APPEND the new data to an existing table
(which creates redundancies of records) or Link. Would you please show me how
to import the new data and have them replace the existing records. Thanks so
much in advance!!!!
 
I try to import new data (from Excel) into an existing Access table. However,
Access only allow me to either APPEND the new data to an existing table
(which creates redundancies of records) or Link. Would you please show mehow
to import the new data and have them replace the existing records. Thanksso
much in advance!!!!

If you really want to replace the records that are in the
spreadsheet, do this:
1. create a link to the Excel table.
2. create a delete query... something along the lines of...
DELETE *
FROM AccessTable
WHERE AccessTable.PrimaryKey = ExcelFile.UniqueID

Then run your insert.

OR, if you are not changing the existing data,
1. create the linke to excel file
2. run the find unmatched query wizard, which returns a select
query.
3. Turn it into an append query.
 
I try to import new data (from Excel) into an existing Access table. However,
Access only allow me to either APPEND the new data to an existing table
(which creates redundancies of records) or Link. Would you please show mehow
to import the new data and have them replace the existing records. Thanksso
much in advance!!!!

If you really want to replace the records that are in the
spreadsheet, do this:
1. create a link to the Excel table.
2. create a delete query... something along the lines of...
DELETE *
FROM AccessTable
WHERE AccessTable.PrimaryKey = ExcelFile.UniqueID

Then run your insert.

OR, if you are not changing the existing data,
1. create the linke to excel file
2. run the find unmatched query wizard, which returns a select
query.
3. Turn it into an append query.
 
Piet Linden said:
If you really want to replace the records that are in the
spreadsheet, do this:
1. create a link to the Excel table.
2. create a delete query... something along the lines of...
DELETE *
FROM AccessTable
WHERE AccessTable.PrimaryKey = ExcelFile.UniqueID

Then run your insert.

OR, if you are not changing the existing data,
1. create the linke to excel file
2. run the find unmatched query wizard, which returns a select
query.
3. Turn it into an append query.

Thank you so much for your help!
 
Piet Linden said:
If you really want to replace the records that are in the
spreadsheet, do this:
1. create a link to the Excel table.
2. create a delete query... something along the lines of...
DELETE *
FROM AccessTable
WHERE AccessTable.PrimaryKey = ExcelFile.UniqueID

Then run your insert.

OR, if you are not changing the existing data,
1. create the linke to excel file
2. run the find unmatched query wizard, which returns a select
query.
3. Turn it into an append query.

Thank you so much for your help!
 
Back
Top