Solved

Find 'similar names' in Access

Posted on 2014-02-06
4
594 Views
Last Modified: 2014-02-06
Dear experts -
We are finding duplicate names in our database - but some are not exactly the same.
Do you have any code for checking if a string is SIMILAR to another?
Thanks -
0
Comment
Question by:terpsichore
  • 2
4 Comments
 
LVL 4

Expert Comment

by:Jack Leach
ID: 39838496
That's a tough one, but look into Fuzzy Matches using SoundEx.  Allen Browne has an article on it here:

http://allenbrowne.com/vba-Soundex.html

hth
0
 

Author Comment

by:terpsichore
ID: 39838556
Thanks - I was thinking more along the lines of: "if either first or last name is the same AND a reasonable percentage of the OTHER name are the same"...
0
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 39838637
How would you define a "reasonable percentage" ...

You can easily check if a First and Last name match:

Dim rst As DAO.Recordset
Set rst = Currentdb.OpenRecordset("SELECT * FROM YourTable WHERE LastName='" & Me.txLastName & "' AND FirstName='" & Me.txFirstName & "'")

If Not (rst.EOF and rst.BOF) Then
  '/ found a match on the first and last, now compare other information
 
End If

So if you then need to examine another value - for example, the Phone - you could continue along with that.
0
 

Author Closing Comment

by:terpsichore
ID: 39838886
Good enough for now - many thanks.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question