| 
 | 
								
									
										|  |  
										|  |  
										| |  Click here to copy the following block |  | 
 
 
 
 
 
 
 Function Soundex(ByVal word As String) As String
 Dim result As String
 Dim i As Long, acode As Integer
 Dim dcode As Integer, oldCode As Integer
 
 
 word = UCase$(word)
 
 Soundex = Left$(word, 1)
 oldCode = Asc(Mid$("01230120022455012623010202", Asc(word) - 64))
 
 For i = 2 To Len(word)
 acode = Asc(Mid$(word, i, 1)) - 64
 
 If acode >= 1 And acode <= 26 Then
 
 dcode = Asc(Mid$("01230120022455012623010202", acode, 1))
 
 If dcode <> 48 And dcode <> oldCode Then
 Soundex = Soundex & Chr$(dcode)
 If Len(Soundex) = 4 Then Exit For
 End If
 oldCode = dcode
 End If
 Next
 End Function
 | 
 |  
										|  |  
										|  |  
 
	
		| Submitted By :
					Nayan Patel 
					 (Member Since : 5/26/2004 12:23:06 PM) |  
		|  |  
		| 
				 | Job Description :   
			He is the moderator of this site and  currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting. |  
		| View all (893) submissions by this author 
			(Birth Date : 7/14/1981 ) |  |  |