Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Duplicate Entries

Status
Not open for further replies.

VeryNew

Technical User
Oct 31, 2002
17
CA
I have a database that obtains all of its data from an excel spreadsheet. I have a macro that does the import quickly to a temp table then an update query that will put it into the permanent table. I am looking for a way to write a 'check' that will tell me that record already exists before dumping from the temp to the permanent table as sometimes the import button is being pushed twice accidentally.
Anyone have any suggestions??

Thanks much in advance
 
I don’t know what is unique to each record what I will try to link the excell to access
Create a append query list all fields and on the unique field criteria -Not In select accesstable.uniquefield from accesstable-
“INSERT INTO accesstable (uniquefield,field1, field2, field3…. )
SELECT uniquefield,field1, field2, field3…. FROM excellsheet WHERE (((excellsheet. uniquefield) Not In (select accesstable.uniquefield from accesstable)));


To combine from many fields see
 
Thanks Pwise.

The problem is the whole thing would need to be looked at - as they are records of transactions
Date, Loc, Record# (would be unique except that it can be blank), follow up etc.
so they can have multiple entries from the same location on the same day. The entire record would have to be checked and compared to the existing data.
I looked at the thread you had suggested and that is what I am looking for - record already exists are you sure you want to proceed...
Can i do that with the query you are suggesting?

Thanks again
 
I don’t understand what you want to do the query I suggested will only append records that are not already in the access table. The other thread only shows what to do if you don’t have one unique field. as for blank fields do you want to be asked before you append them?
 
Sorry - i am quite new at this and also not being very clear - thank you for your help so far.
I will work with your query as i believe that is what i want. Only append if it isnt already there. The problem is i do not have a unique field rather i want it to find unique records - so all fields in one record.

Does that make sense?
 
combine all fields i think it will work
good luck
let un know how it worked out
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top