Solved

Find 'similar names' in Access

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

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

695 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