H
hollyylloh
I am trying to do roughly as stated in this code sample. I am looking for
some advice on how to go about this the most efficiently as this will be run
over several thousand records at a time.
Dim db As Database
Dim rs As DAO.Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("tblImported")
Do While Not rs.EOF
rs.Edit
'Here I want to compare each value in the imported table against an existing
table to find possible duplicate values. Something like this:?
SELECT tblImported.Company FROM tblImported
WHERE (((tblImported.Company) Like '*' & [tblContacts]![Company]& '*'));
'Then on each record I want to separate out any entries that might have
similar values. These will be copied to a table for further processing.
Values without similar entries will be copied to a different table. So
something like this:?
'Count results
'If Count is > 1 then
'Copy record to table tblInProcess
'else
'copy record to table tblToExport
Loop
rs.Close
I would like to plan ahead and start with the best plan of action and then
work out the details of the code from there. Your advice would be
appreciated.
some advice on how to go about this the most efficiently as this will be run
over several thousand records at a time.
Dim db As Database
Dim rs As DAO.Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("tblImported")
Do While Not rs.EOF
rs.Edit
'Here I want to compare each value in the imported table against an existing
table to find possible duplicate values. Something like this:?
SELECT tblImported.Company FROM tblImported
WHERE (((tblImported.Company) Like '*' & [tblContacts]![Company]& '*'));
'Then on each record I want to separate out any entries that might have
similar values. These will be copied to a table for further processing.
Values without similar entries will be copied to a different table. So
something like this:?
'Count results
'If Count is > 1 then
'Copy record to table tblInProcess
'else
'copy record to table tblToExport
Loop
rs.Close
I would like to plan ahead and start with the best plan of action and then
work out the details of the code from there. Your advice would be
appreciated.