Phone numbers should be stored as text, so that's a good thing.
Another problem that I see is some people format phone numbers differently.
(555) 555-5555 vs 555.555.5555 vs 555-555-5555.
Then there are phone number with or without an area code.
Let's not even think about phone numbers from other countries!
In one of the files, are the numbers very standardized so that all the phone
numbers look the same? If so there may be hope.
Actually before we go down that route, how many records are we talking about
and is this a one-time thing? If there aren't too many records, and the table
with the problems doesn't get updated from another system frequently, you
might just want to do it manually by adding new Home and Cell fields.
There's another problem if you are joining the two tables based on phone
numbers: More than one person could share a phone number - especially home
phones. That could cause duplicate records to show.
Back to the matther at hand. In the query below, tbl2 is the table with the
problem telephone numbers. tbl1 has standardized telephone number formatting
like (555) 555-5555.
I've extracted the middle 555 and end 5555 and used them in Like statements.
If the phone numbers in tbl1 are different, such as 555-555-5555, you will
need to adjust the Mid statements.
SELECT tbl1.*, tbl2.*
FROM tbl1, tbl2
WHERE tbl2.PhoneNumbers
Like "*" & Mid([tbl1]![PhoneNumbers],5,3) & "*"
AND tbl2.PhoneNumbers
Like "*" & Mid([tbl1]![PhoneNumbers],7,4) & "*" ;
With such a fuzzy match, there are plenty of places for bad data to creep
in. For example more than one person using the same home phone. Or something
unlikely such as two numbers the same except for the area code.