Vba code delete duplicated records

kanelones

Board Regular
Joined
Aug 25, 2010
Messages
101
Hi!

Can you help me to avoid duplicated records on importation from excel to acces?

Need to add a VBA code line in order to do so..

Thanks a lot for you invaluable help.!

Regards
 

Some videos you may like

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
54,515
Office Version
  1. 365
Platform
  1. Windows
If you set the Primary Key fields on your table, it will not allow duplicate records to be imported, and automatically block them from being imported without any need for any special code.

Alternatively, if the records are Excel are truly duplicates (where every field is the same), it would be even easier to use Excel's built-in "Remove Duplicates" functionality before importing.
 
Last edited:

kanelones

Board Regular
Joined
Aug 25, 2010
Messages
101
Thanks! I'm new with Acces.
Can you please explain it to me,? where do i find this "Primary Key Fields"?
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
54,515
Office Version
  1. 365
Platform
  1. Windows
Thanks! I'm new with Acces.
Can you please explain it to me,? where do i find this "Primary Key Fields"?
Already saw that, Thanks a lot!
So, are you saying that you are all set, or are you still in need of something?
 

Watch MrExcel Video

Forum statistics

Threads
1,109,518
Messages
5,529,307
Members
409,862
Latest member
lbisacca
Top