Append/Refresh Tables

  • Thread starter Thread starter Haji
  • Start date Start date
H

Haji

Hi,

I am trying to append records to table using an append
query. However, I only want to add new records and avoid
duplicates. I will probably run this daily. I don't
have a date restrictor so I need to find a way to append
with only new records.

Thanks,

Haji
 
Hi,


Build an index that does not allow duplication, use DAO to append the
records (like CurrentDb.Execute "INSERT INTO... ") and forget the error
is acceptable?


Otherwise, you can proceed as for a unit prices list update:


UPDATE oldPrices RIGHT JOIN newPrices
ON oldPrices.ItemID = newPrices.ItemID
SET oldPrices.ItemID=newPrices.ItemID,
oldPrices.UnitPrice = newPrices.UnitPrice



which update existing prices and append new one, in just one query (Jet
only).


Hoping it may help,
Vanderghast, Access MVP
 
Back
Top