Duplicate excel records importing into an existing Access database

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to import an excel worksheet into an existing access database and
would like to flag (and delete) any records that already exist in the
database. The records would have to have 2 fields match the criteria in
access to be safe to delete. Any suggestions?
 
Set the two fields in the Access table as either a unique index or primary
key. Access will not allow them into the table that way. After throwing up an
error message, it will allow in all the non-duplicate records if you wish.
 
The two fields in the Access database are not unique numbers (they are
product and order numbers). We are trying to ensure that any new imported
orders are
not duplicated based on the two field criteria. It sounds like if I change
the fields as a unique index or primary key in Access then NO identical
product number would be allowed within the existing database. Is that
correct?

BTW, thanks so much for your help, I am STUMPED.

SUE


The existing Access database may include existing duplicate numbers in the
two fields however, we would need to make sure that any new information
imported from are not allowed based on the two field criteria. Since
 
A somewhat messy alternative.

Import into Temp table that has all the fields

Write an append query that links the temp table with the final table
(that you are appending to) by those two fields and make the condition
for the append that BOTH of those two fields are NULL in the final
table you are appending them to.

Ron
 
Yes. In fact if there is any existing duplicate data, Access would not let
you make the combination of those two fields a unique index or primary key.
 

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

Back
Top