Solved

Find 'similar names' in Access

Posted on 2014-02-06
4
625 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

738 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