<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Onlydarksets &#187; Access</title>
	<atom:link href="http://onlydarksets.com/tag/access/feed/" rel="self" type="application/rss+xml" />
	<link>http://onlydarksets.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Thu, 14 Jan 2010 14:36:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Soundex for Microsoft Access</title>
		<link>http://onlydarksets.com/2008/04/21/soundex-for-microsoft-access/</link>
		<comments>http://onlydarksets.com/2008/04/21/soundex-for-microsoft-access/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 18:41:47 +0000</pubDate>
		<dc:creator>onlydarksets</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Access]]></category>
		<category><![CDATA[Microsoft Office]]></category>

		<guid isPermaLink="false">http://onlydarksets.wordpress.com/2008/04/21/soundex-for-microsoft-access/</guid>
		<description><![CDATA[I found this code to add Soundex to Microsoft Access, which is invaluable for deduping records.&#160; However, it has a key error that causes it to fail &#8211; the variable name in the private function is incorrect. It&#8217;s a simple fix (see red below). Function Soundex(strName As String) As String&#8216;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;&#8216; Input: A string&#8216; Outputs: U.S. [...]]]></description>
			<content:encoded><![CDATA[<p>I found <a href="http://msdn2.microsoft.com/en-us/library/aa662178.aspx">this code to add Soundex</a> to Microsoft Access, which is invaluable for deduping records.&nbsp; However, it has a key error that causes it to fail &#8211; the variable name in the private function is incorrect.</p>
<p>It&#8217;s a simple fix (see <strong><font color="#ff0000">red</font></strong> below).</p>
<blockquote><p>Function Soundex(strName As String) As String<br />&#8216;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />&#8216; Input: A string<br />&#8216; Outputs: U.S. National archive &#8220;Soundex&#8221; number<br />&#8216;&nbsp;&nbsp; This number is useful to find similar last names<br />&#8216; Created By: JLV 03/01/2003<br />&#8216; Last Revised: JLV 06/27/2005<br />&#8216;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />&#8216; A Soundex code is the first letter, followed by<br />&#8216; three numbers derived from evaluating the remaining<br />&#8216; letters.&nbsp; Vowels (including Y) and the letters H and W<br />&#8216; are ignored.&nbsp; When consecutive letters return the<br />&#8216; same numeric code, the number appears only once.<br />&#8216; When two letters with the same code are separated only<br />&#8216; by H or W, the second letter is ignored.<br />&#8216; Letters are translated to numbers as follows:<br />&#8216;&nbsp;&nbsp; B, P, F, V = 1<br />&#8216;&nbsp;&nbsp; C, S, G, J, K, Q, X, Z = 2<br />&#8216;&nbsp;&nbsp; D, T = 3<br />&#8216;&nbsp;&nbsp; L = 4<br />&#8216;&nbsp;&nbsp; M, N = 5<br />&#8216;&nbsp;&nbsp; R = 6<br />&#8216; If the final code after examining all letters is less<br />&#8216; than three digits, the code is padded with zeros.<br />&#8216; Working variables:<br />&#8216; String to build the code, string to hold code number<br />Dim strCode As String, strCodeN As String<br />&#8216; Length of original string, last code returned, looping integer<br />Dim intLength As Integer, strLastCode As String, intI As Integer<br /> &#8216; Save the first letter<br /> strCode = UCase(Left(strName, 1))<br /> &#8216; Save its code number to check for duplicates<br /> strLastCode = GetSoundexCode(strCode)<br /> &#8216; Calculate length to examine<br /> intLength = Len(strName)<br /> &#8216; Create the code starting at the second letter.<br /> For intI = 2 To intLength<br />&nbsp;&nbsp; strCodeN = GetSoundexCode(Mid(strName, intI, 1))<br />&nbsp;&nbsp; &#8216; If two letters that are the same are next to each other<br />&nbsp;&nbsp; &#8216; only count one of them<br />&nbsp;&nbsp; If strCodeN &gt; &#8220;0&#8243; And strLastCode &lt;&gt; strCodeN Then<br />&nbsp;&nbsp;&nbsp;&nbsp; &#8216; Different code number, add to the result<br />&nbsp;&nbsp;&nbsp;&nbsp; strCode = strCode &amp; strCodeN<br />&nbsp;&nbsp; End If<br />&nbsp;&nbsp; &#8216; If this is not the special &#8220;skip&#8221; code (H or W)<br />&nbsp;&nbsp; If strCodeN &lt;&gt; &#8220;0&#8243; Then<br />&nbsp;&nbsp;&nbsp;&nbsp; &#8216; Save the last code number<br />&nbsp;&nbsp;&nbsp;&nbsp; strLastCode = strCodeN<br />&nbsp;&nbsp; End If<br /> &#8216; Loop<br /> Next intI<br /> &#8216; Check the length<br /> If Len(strCode) &lt; 4 Then<br />&nbsp;&nbsp; &#8216; Pad zeros<br />&nbsp;&nbsp; strCode = strCode &amp; String(4 &#8211; Len(strCode), &#8220;0&#8243;)<br /> Else<br />&nbsp;&nbsp; &#8216; Make sure not more than 4<br />&nbsp;&nbsp; strCode = Left(strCode, 4)<br /> End If<br /> &#8216; Return the result<br /> Soundex = strCode<br />End Function
<p>Private Function GetSoundexCode(strCharString) As String<br />&#8216;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />&#8216; Input: One character<br />&#8216; Output: U.S. National archive &#8220;Soundex&#8221; number<br />&#8216;&nbsp;&nbsp; for the specified letter<br />&#8216; Created By: JLV 03/01/2003<br />&#8216; Last Revised: ZHM 04/21/2008<br />&#8216;&nbsp;&nbsp; &#8211; Fixed error in variable names<br />&#8216;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br /> Select Case <strong><font color="#ff0000">strCharString</font></strong><br />&nbsp;&nbsp; Case &#8220;B&#8221;, &#8220;F&#8221;, &#8220;P&#8221;, &#8220;V&#8221;<br />&nbsp;&nbsp;&nbsp; GetSoundexCode = &#8220;1&#8243;<br />&nbsp;&nbsp; Case &#8220;C&#8221;, &#8220;G&#8221;, &#8220;J&#8221;, &#8220;K&#8221;, &#8220;Q&#8221;, &#8220;S&#8221;, &#8220;X&#8221;, &#8220;Z&#8221;<br />&nbsp;&nbsp;&nbsp;&nbsp; GetSoundexCode = &#8220;2&#8243;<br />&nbsp;&nbsp; Case &#8220;D&#8221;, &#8220;T&#8221;<br />&nbsp;&nbsp;&nbsp;&nbsp; GetSoundexCode = &#8220;3&#8243;<br />&nbsp;&nbsp; Case &#8220;L&#8221;<br />&nbsp;&nbsp;&nbsp;&nbsp; GetSoundexCode = &#8220;4&#8243;<br />&nbsp;&nbsp; Case &#8220;M&#8221;, &#8220;N&#8221;<br />&nbsp;&nbsp;&nbsp;&nbsp; GetSoundexCode = &#8220;5&#8243;<br />&nbsp;&nbsp; Case &#8220;R&#8221;<br />&nbsp;&nbsp;&nbsp;&nbsp; GetSoundexCode = &#8220;6&#8243;<br />&nbsp;&nbsp; Case &#8220;H&#8221;, &#8220;W&#8221;<br />&nbsp;&nbsp;&nbsp;&nbsp; &#8216; Special &#8220;skip&#8221; code<br />&nbsp;&nbsp;&nbsp;&nbsp; GetSoundexCode = &#8220;0&#8243;<br /> End Select<br />End Function</p>
</blockquote>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save">Share/Save</a> </p>]]></content:encoded>
			<wfw:commentRss>http://onlydarksets.com/2008/04/21/soundex-for-microsoft-access/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
