Show percent match?

  • Thread starter Thread starter DevilDog1978
  • Start date Start date
D

DevilDog1978

How can I get access to show percent match of a field in one table to a field
in another table? For example if I had an 8902A in the model number field of
a table and 8902AOPTE51 it would return a 45% match? Another example would be
an 34401AOPT010 and a 34401AOPTH31010 with a 80% match?
 
Debug.Print CLng(Len("8902A") / len("8902AOPTE51") *100)
45


Matching: CLng(Len([Model Number Field]) / len([Model Number Field]) *100)

But that only works if the leading characters are the same. In your second
example, it might not be exactly correct.

Also as they are in different tables, you'll need something like a Primary
/Foreign Key relationship built upon other fields to join the tables.
 
Back
Top