<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5300317740662216847</id><updated>2024-08-28T07:01:59.356-07:00</updated><title type='text'>MS Access VB Programming Tips and Tutorial</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://msaccessvb.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5300317740662216847/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://msaccessvb.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>iShare</name><uri>http://www.blogger.com/profile/07107398341963279726</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8buDoBqGSiFw9movPjh6UvaAHPHaTRdmVc_0Q4FVHyxrbzv7s143Aj0KksDuKq56YF3hjk2AaZaFKWFtsKiYJ8Of92Y9ATlT45RwvJ4AnqJgBjZaqT1Uqp033ryg2IUc/s220/small2.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5300317740662216847.post-3877065533296510059</id><published>2012-01-12T19:35:00.000-08:00</published><updated>2012-01-12T19:35:12.461-08:00</updated><title type='text'>Indian Rupee Currency - Number to Word Conversion</title><content type='html'>Let me share you my latest ms access codes that will convert word to number using the indian rupee currency. While working on this code, I found it difficult since the indian rupee currency or numeral system is unique, its different from the standard american numeral system. Anyway, to make my post short (lol), you can find the codes below. &lt;br /&gt;
&lt;br /&gt;
Follow the following steps:&lt;br /&gt;
&lt;br /&gt;
Step #1:  Copy my ms access visual basic function below and insert it into your ms access module&lt;br /&gt;
&lt;br /&gt;
Step #2:  create a form in ms access with two text fields on it.  Name the first text field as  txtNumber and the other text field as txtInwords.  Change the caption of txtNumber with Number and txtInwords with In Words&lt;br /&gt;
&lt;br /&gt;
Step #3:  Set the AfterUpdate Event of the txtNumber text box with this visual basic command: Me.txtInwords = convert(me.txtNumber). &lt;br /&gt;
&lt;br /&gt;
You may now run your form and try.&lt;br /&gt;
&lt;br /&gt;
Below is the snapshot of the program:&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrIY4jEdhcfOPdqr9GJhGqmub0QFnGxWFmzeyTtYtLTTpfpRilmn56n-11wxOTKh-LwzEYCUOuD_cXjDekT2XjradX4ULEOSyeBD7bQBzPYVrS1eeuPpvtfZph2K0bd1QLqOZYSLrlEt4K/s1600/rupee-word-conversion.png&quot; imageanchor=&quot;1&quot; style=&quot;clear:left; margin-right:1em; margin-bottom:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;154&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrIY4jEdhcfOPdqr9GJhGqmub0QFnGxWFmzeyTtYtLTTpfpRilmn56n-11wxOTKh-LwzEYCUOuD_cXjDekT2XjradX4ULEOSyeBD7bQBzPYVrS1eeuPpvtfZph2K0bd1QLqOZYSLrlEt4K/s320/rupee-word-conversion.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/p&gt;&lt;br /&gt;
And lastly, the most important one, are the codes which you can find below:&lt;br /&gt;
&lt;br /&gt;
&lt;p style=&quot;font-size:9px; color:#333; font-family:Verdana, Geneva, sans-serif;&quot;&gt;Function Convert(ByVal mAmount As String, Optional Enclosed As Boolean)&lt;br /&gt;
        Dim mDec As Variant, mDecWhat As String, mNumberOfDigits, mCntr, Word, OneD, TwoD, mInput&lt;br /&gt;
        mInput = Format(mAmount, &quot;####0.00&quot;)&lt;br /&gt;
        OneD = Array(&quot;&quot;, &quot;One &quot;, &quot;Two &quot;, &quot;Three &quot;, &quot;Four &quot;, &quot;Five &quot;, &quot;Six &quot;, &quot;Seven &quot;, &quot;Eight &quot;, &quot;Nine &quot;, &quot;Ten &quot;, &quot;Eleven &quot;, &quot;Twelve &quot;, &quot;Thirteen &quot;, &quot;Fourteen &quot;, &quot;Fifteen &quot;, &quot;Sixteen &quot;, &quot;Seventeen &quot;, &quot;Eighteen &quot;, &quot;Nineteen &quot;)&lt;br /&gt;
        TwoD = Array(&quot;&quot;, &quot;Ten &quot;, &quot;Twenty &quot;, &quot;Thirty &quot;, &quot;Forty &quot;, &quot;Fifty &quot;, &quot;Sixty &quot;, &quot;Seventy &quot;, &quot;Eighty &quot;, &quot;Ninety &quot;)&lt;br /&gt;
        mDec = InStr(1, mInput, &quot;.&quot;, 1)&lt;br /&gt;
        If mDec = 0 Then mAmount = mInput&lt;br /&gt;
        If mDec &lt;&gt; 0 Then mDecWhat = Right(mInput, Len(mInput) - mDec): mAmount = mInput: mInput = Mid(mInput, 1, mDec - 1)&lt;br /&gt;
        If Len(mInput) &gt; 12 Then Exit Function&lt;br /&gt;
        If Len(mInput) &lt;= 3 Then mNumberOfDigits = Array(mInput, &quot;&quot;, &quot;&quot;, &quot;&quot;)
        If Len(mInput) &gt;= 4 And Len(mInput) &lt;= 6 Then mNumberOfDigits = Array(Mid(mInput, 1, Len(mInput) - 3), Right(mInput, 3), &quot;&quot;, &quot;&quot;)
        If Len(mInput) &gt;= 7 And Len(mInput) &lt;= 9 Then mNumberOfDigits = Array(Mid(mInput, 1, Len(mInput) - 6), Mid(mInput, Len(mInput) - 5, 3), Right(mInput, 3), &quot;&quot;)
        If Len(mInput) &gt;= 10 And Len(mInput) &lt;= 12 Then mNumberOfDigits = Array(Mid(mInput, 1, Len(mInput) - 9), Mid(mInput, Len(mInput) - 8, 3), Mid(mInput, Len(mInput) - 5, 3), Right(mInput, 3))
        If Len(mInput) &lt;= 3 Then mNumberOfDigits = Array(mInput, &quot;&quot;, &quot;&quot;, &quot;&quot;)
        If Len(mInput) &gt;= 4 And Len(mInput) &lt;= 5 Then mNumberOfDigits = Array(Mid(mInput, 1, Len(mInput) - 3), Right(mInput, 3), &quot;&quot;, &quot;&quot;)
        If Len(mInput) &gt;= 6 And Len(mInput) &lt;= 7 Then mNumberOfDigits = Array(Mid(mInput, 1, Len(mInput) - 5), Mid(mInput, Len(mInput) - 4, 2), Right(mInput, 3), &quot;&quot;)
        If Len(mInput) &gt;= 8 And Len(mInput) &lt;= 9 Then mNumberOfDigits = Array(Mid(mInput, 1, Len(mInput) - 7), Mid(mInput, Len(mInput) - 6, 2), Mid(mInput, Len(mInput) - 4, 2), Right(mInput, 3))
        For mCntr = 0 To IIf(Len(mInput) &lt;= 3, 0, IIf(Len(mInput) &gt;= 4 And Len(mInput) &lt;= 5, 1, IIf(Len(mInput) &gt;= 6 And Len(mInput) &lt;= 7, 2, IIf(Len(mInput) &gt;= 8 And Len(mInput) &lt;= 9, 3, 0))))
            If Len(mNumberOfDigits(mCntr)) = 3 Then
               Word = Word &amp; OneD(Val(Left(mNumberOfDigits(mCntr), 1))) &amp; IIf(Left(mNumberOfDigits(mCntr), 1) &lt;&gt; &quot;0&quot;, &quot;Hundred&quot;, &quot;&quot;)&lt;br /&gt;
               If Mid(mNumberOfDigits(mCntr), 2, 2) &lt;= 19 Then Word = Word &amp; &quot; &quot; &amp; OneD(Val(Mid(mNumberOfDigits(mCntr), 2))) Else If Mid(mNumberOfDigits(mCntr), 2, 1) &gt;= 1 Then Word = Word &amp; &quot; &quot; &amp; TwoD(Val(Mid(mNumberOfDigits(mCntr), 2, 1))) &amp; IIf(Right(mNumberOfDigits(mCntr), 1) &gt;= 1, OneD(Right(mNumberOfDigits(mCntr), 1)), &quot;&quot;)&lt;br /&gt;
            ElseIf Len(mNumberOfDigits(mCntr)) = 2 Then&lt;br /&gt;
               If Val(mNumberOfDigits(mCntr)) &lt;= 19 Then Word = Word &amp; &quot; &quot; &amp; OneD(Val(mNumberOfDigits(mCntr))) Else If Val(mNumberOfDigits(mCntr)) &gt;= 2 Then Word = Word &amp; &quot; &quot; &amp; TwoD(Val(Left(mNumberOfDigits(mCntr), 1))) &amp; IIf(Right(mNumberOfDigits(mCntr), 1) &gt;= 1, OneD(Val(Right(mNumberOfDigits(mCntr), 1))), &quot;&quot;)&lt;br /&gt;
            ElseIf Len(mNumberOfDigits(mCntr)) = 1 Then&lt;br /&gt;
               Word = Word &amp; &quot; &quot; &amp; OneD(Val(mNumberOfDigits(mCntr)))&lt;br /&gt;
            End If&lt;br /&gt;
            If Len(mInput) &gt;= 4 And Len(mInput) &lt;= 5 Then Word = Word &amp; IIf(mCntr = 0 And mNumberOfDigits(0) &gt; 0, &quot;Thousand&quot;, &quot;&quot;)&lt;br /&gt;
            If Len(mInput) &gt;= 6 And Len(mInput) &lt;= 7 Then Word = Word &amp; IIf(mCntr = 0 And mNumberOfDigits(0) &gt; 0, &quot;Lakh&quot;, IIf(mCntr = 1 And mNumberOfDigits(1) &gt; 0, &quot;Thousand &quot;, &quot;&quot;))&lt;br /&gt;
            If Len(mInput) &gt;= 8 And Len(mInput) &lt;= 9 Then Word = Word &amp; IIf(mCntr = 0 And mNumberOfDigits(0) &gt; 0, &quot;Crore&quot;, IIf(mCntr = 1 And mNumberOfDigits(1) &gt; 0, &quot;Lakh&quot;, IIf(mCntr = 2 And mNumberOfDigits(2) &gt; 0, &quot;Thousands &quot;, &quot;&quot;)))&lt;br /&gt;
        Next&lt;br /&gt;
     If Val(mAmount) &gt; 0 Then Word = Word&lt;br /&gt;
     If mDec &lt;&gt; 0 Then&lt;br /&gt;
        If Val(mDecWhat) &gt;= 1 And Val(mDecWhat) &lt;= 19 Then
           Word = Word &amp; &quot; and &quot; &amp; OneD(Val(mDecWhat)) &amp; &quot; Paise&quot;
        ElseIf Val(mDecWhat) &gt;= 2 Then&lt;br /&gt;
           Word = Word &amp; &quot; and &quot; &amp; TwoD(Val(Left(mDecWhat, 1))) &amp; IIf(Right(mDecWhat, 1) &gt;= 1, &quot; &quot; &amp; OneD(Val(Right(mDecWhat, 1))) &amp; &quot; Paise&quot;, &quot; Paise&quot;)&lt;br /&gt;
        End If&lt;br /&gt;
     End If&lt;br /&gt;
     Convert = LTrim(Word): Word = &quot;&quot;&lt;br /&gt;
End Function&lt;br /&gt;
&lt;p&gt;I am sharing this number to word conversion using indian rupee currency for free all i ask is to leave your comments here :)&lt;br /&gt;
&lt;/p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccessvb.blogspot.com/feeds/3877065533296510059/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://msaccessvb.blogspot.com/2012/01/indian-rupee-currency-number-to-word.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5300317740662216847/posts/default/3877065533296510059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5300317740662216847/posts/default/3877065533296510059'/><link rel='alternate' type='text/html' href='http://msaccessvb.blogspot.com/2012/01/indian-rupee-currency-number-to-word.html' title='Indian Rupee Currency - Number to Word Conversion'/><author><name>iShare</name><uri>http://www.blogger.com/profile/07107398341963279726</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8buDoBqGSiFw9movPjh6UvaAHPHaTRdmVc_0Q4FVHyxrbzv7s143Aj0KksDuKq56YF3hjk2AaZaFKWFtsKiYJ8Of92Y9ATlT45RwvJ4AnqJgBjZaqT1Uqp033ryg2IUc/s220/small2.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrIY4jEdhcfOPdqr9GJhGqmub0QFnGxWFmzeyTtYtLTTpfpRilmn56n-11wxOTKh-LwzEYCUOuD_cXjDekT2XjradX4ULEOSyeBD7bQBzPYVrS1eeuPpvtfZph2K0bd1QLqOZYSLrlEt4K/s72-c/rupee-word-conversion.png" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5300317740662216847.post-8893121140953822844</id><published>2011-02-06T20:23:00.000-08:00</published><updated>2011-10-25T00:13:12.827-07:00</updated><title type='text'>Number to Words Conversion With MS Access VB Codes</title><content type='html'>&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Let me share you these simple tips on how to create  an ms access visual basic function that will convert numbers into words  (up to billions).&amp;nbsp; This function is very useful if you want a converted  amount in words to appear on your voucher, checks, payslips, payroll  summary report, just to name a few.&lt;br /&gt;
&lt;br /&gt;
I created this function myself and I can guarantee you that it is 100%  functional in ms access 2003 (i am not sure with other versions of ms  access but I think it will work the same).&amp;nbsp; With this very simple  function, I was able to meet the needs of my clients in terms of numbers  to words conversion requirement -- they were all satisfied with the  result.&lt;br /&gt;
&lt;br /&gt;
The function is very easy to use.&amp;nbsp; Simply copy the function and then  paste it in one of your modules in ms access.&amp;nbsp; Now you can call this  function anywhere from your ms access application (reports, forms,  queries, etc). &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt; Please try it by following these 3 simple steps:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;Step #1:&lt;/span&gt;&lt;/b&gt;&amp;nbsp; Copy my ms access visual basic function below and insert it into your ms access module.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;iframe frameborder=&quot;0&quot; height=&quot;250&quot; id=&quot;i_viewer&quot; name=&quot;n_viewer&quot; scrolling=&quot;auto&quot; src=&quot;http://wordtonumber.blogspot.com/2011/02/function-convertbyval-mamount-as-string.html&quot; width=&quot;550&quot;&gt;&lt;/iframe&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;b style=&quot;color: red;&quot;&gt;Step #2:&lt;/b&gt;&amp;nbsp; create a form in ms access with two text fields on it.&amp;nbsp; Name the first text field as&amp;nbsp; txtNumber and the other text field as txtInwords.&amp;nbsp; Change the caption of txtNumber with Number and txtInwords with In Words&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;color: red;&quot;&gt; Step #3:&lt;/b&gt;&amp;nbsp; Set the AfterUpdate Event of the txtNumber text box with this visual basic command: Me.txtInwords = convert(me.txtNumber). &lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6; font-size: small;&quot;&gt;You may now run your form and try.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;The sample visual basic codes can include trillions please let me know i will include it for you.&amp;nbsp; You can email me at &lt;b&gt;mfirebux@gmail.com.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
If you have anything about to say about this sample ms access visual basic function please let me know -- just leave your comment here.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;How about number to word conversion using Indian Numeral System?  Contact me should you need this kind of conversion in MS Access.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://msaccessvb.blogspot.com/feeds/8893121140953822844/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://msaccessvb.blogspot.com/2011/02/number-to-words-conversion-with-ms.html#comment-form' title='40 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5300317740662216847/posts/default/8893121140953822844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5300317740662216847/posts/default/8893121140953822844'/><link rel='alternate' type='text/html' href='http://msaccessvb.blogspot.com/2011/02/number-to-words-conversion-with-ms.html' title='Number to Words Conversion With MS Access VB Codes'/><author><name>iShare</name><uri>http://www.blogger.com/profile/07107398341963279726</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8buDoBqGSiFw9movPjh6UvaAHPHaTRdmVc_0Q4FVHyxrbzv7s143Aj0KksDuKq56YF3hjk2AaZaFKWFtsKiYJ8Of92Y9ATlT45RwvJ4AnqJgBjZaqT1Uqp033ryg2IUc/s220/small2.jpg'/></author><thr:total>40</thr:total></entry></feed>