Using a SoundEx to search for similar sounding names (1 Viewer)

Status
Not open for further replies.

DCrake

Remembered
Local time
Today, 19:07
Joined
Jun 8, 2005
Messages
8,632
This little demo uses a soundex index to search for similar sounding names in a database.

How to incorperate into your application:
Create a new field in your selected table:

Name: FldSoundexCode
Type: Long Integer

Create a new query and bring down the field you want to perform the soundex search on and the above field.

In a new column
Sn:GetSoundex([YourTextFieldHere])

Run the query. This should bring up 3 columns

Col1 : Your text field
Col2 : Your new empty field
Col3 : The soundex value of the text field

Highlight column 3 and select copy
Highlight column 2 and select paste.

Design the module ModSoundex as bring up the Function CheckForSimilarSurnames()

edit this line

Code:
    sStr = "Select * From TblPeople Where FldSoundexCode=" & Val(xSoundex)

Change it to match your table name and field name

Edit this line

strItems = strItems & rs("fldNameforLetter") & ";"

Change this to match any field(s) in yout table

Save and Close module

View the vba in the form FrmSoundexDemo to see how to use in your application.


David
 

Attachments

  • Soundex.mdb
    196 KB · Views: 1,526

Atomic Shrimp

Humanoid lifeform
Local time
Today, 19:07
Joined
Jun 16, 2000
Messages
1,954
Soundex is mind-bogglingly cool - I can't get over the fact that it's an algorithm that was invented in 1918 - before computers.
 
Status
Not open for further replies.

Users who are viewing this thread

Top Bottom