Solved

Find 'similar names' in Access

Posted on 2014-02-06
4
552 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ms/access ftp / SFTP 3 32
Direct Mail software 4 42
How to base a filter depending on fields contents? 15 45
Getting Run-Time Error 13 - Type Mismatch 3 25
In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

919 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now