Hello Everyone I am trying to Filter data that has miss matched First and Last name but may potentially be the same person by compareing certain information such as their number and date of birth, here is the table.
Number MI First Name Last Name DOB 15241543 123456789 James Matheson 2/25/1980 15241543 123456789 Jams Matheson 2/25/1980 12345679 124512451 Monroe Matheson 3/25/1980 12345679 124512451 Monro Matheson 3/25/1980 54789654 152415241 Dilan Pumley 4/23/1970 54789658 154215246 Michael Lan 1/30/1989
As you can see the person named "James Matheson" has a similar account to "jams Matheson" their DOB and Number are the same so it can potentially be the same person. So in the end when this table is filtered it should only show the information for "James Matheson","Jams Matheson", "Monroe Matheson", and "Monro Matheson". So I am trying to filter out anyone that meet those criteria, here is the code I am thinking of.
for(i=1 to Len(DOB))
for(j=1 to Len(MI))
for(k=1 to Len(Number))
for(L=1 to Len([First Name]))
for(M=1 to Len([Last Name]))
if ( (DOB(i)=DOB(i++)) AND ((Number(k)=Number(k++)) OR (MI(j)=MI(j++))) ([First Name](L)<>[First Name](L++) OR [Last Name](M)<>[Last Name](M++))) Then
Me.Filter=DOB(i) & "AND DOB(i++)"
end if
next
next
next
next
next
So my main problem is how can I go through each value in a column the current way I have it now is it takes the length of the string instead of the column so it does not work well and can I filter multiple values in a single field at the same time?
THANKS ANY HELP IS GREATLY APPRECIATED!!!!