Importing new records to a table


D

David Findlay

I've made an Access application that provides a better interface to a
legacy DBF based DB program. I import all the DBF files as tables and
then use my own forms and queries to view it. When the legacy DB
program vendor ships updates they ship new DBF files. Previously I've
just been deleting tables, and recreating them from the new DBF files
which worked fine. However the new versions of the files frequently
have records removed that were in previous versions. My users want to
keep these records when doing updates. I've tried a number of
strategies only to be frustrated by the difficulty of manipulating
large amounts of data in VBA.

The current strategy I want to use is this: Import the new table,
combine the old table and new table, then remove duplicates. The other
option is copy any unique record from the new table into the old
table(preferable option, but can't find a way of doing it).

Can anyone give me some tips on how to do this? Thanks,

David
 
Ad

Advertisements

S

SusanV

Hi David,

If you set the table to have a primary key (or index - no duplicates) which
also exists in the table you're importing, you can use an INSERT query - you
will only add the new items, as the primary key will not allow duplicates to
be brought in. If you also want to update your existing table with newer
info for these existing records, use an update query as well.
 
Ad

Advertisements

S

SteveS

I would think you could import the new DBF records directly into the existing
(old) table and run a find duplicates query.

In the main database window, click on the Query tab, then click on NEW. One
of the wizards is "Find Duplicates Query Wizard". You can save this query and
rerun it any time.


HTH
 

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