Advertisement

[x]
Attachment Details

Modify the Number to English code slightly in access

[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.8
G'day experts.  Here is some code an expert wrote for me (weelio) as in my access module. this works great but I need slightly more from it. Bascially what I want is the english to be like this (the code turns numerical value into english representation)

1050 = One thousnand and fifty
1025 = One thousand and twenty five

currently the code shows

1050 = One thousand fifty
2456 = Two thousand fifty six

I need the ands in the right place.

Function nnn2words(iNum)
ss = "one,two,three,four,five,six,seven,eight,nine"
ds = "ten,eleven,twelve,thirteen,fourteen,fifteen,sixteen," & _
    "seventeen,eighteen,nineteen"
ts = "twenty,thirty,forty,fifty,sixty,seventy,eighty,ninety"
qs = ",thousand,million,billion"

    a = Split(ss, ",")
    i = iNum Mod 10
    If i > 0 Then s = a(i - 1)
    ii = Int(iNum Mod 100) \ 10
    If ii = 1 Then
        s = Split(ds, ",")(i)
    ElseIf ((ii > 1) And (ii < 10)) Then
        s = Split(ts, ",")(ii - 2) & " " & s
    End If
    i = (iNum \ 100) Mod 10
    If i > 0 Then s = a(i - 1) & " hundred " & s
    nnn2words = s
End Function
 
Function num2words(iNum)
ss = "one,two,three,four,five,six,seven,eight,nine"
ds = "ten,eleven,twelve,thirteen,fourteen,fifteen,sixteen," & _
    "seventeen,eighteen,nineteen"
ts = "twenty,thirty,forty,fifty,sixty,seventy,eighty,ninety"
qs = ",thousand,million,billion"
Dim s, a, b, i, ii, j, iii
     i = iNum
    If i < 0 Then
        b = True
        i = i * -1
    End If
    If i = 0 Then
        s = "zero"
    ElseIf i <= 2147483647 Then
        a = Split(qs, ",")
        For j = 0 To 3
            iii = i Mod 1000
            i = i \ 1000
            If iii > 0 Then s = nnn2words(iii) & _
                " " & a(j) & " " & s
        Next
    Else
        s = "out of range value"
    End If
    If b Then s = "negative " & s
    num2words = Trim(s)
End Function
Related Solutions
Related Solutions
 
Loading Advertisement...
 

Rank: Genius

Expert Comment by matthewspatrick:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Author Comment by robjeeves:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 

Rank: Genius

Expert Comment by jefftwilley:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Author Comment by robjeeves:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 

Rank: Genius

Assisted Solution by jefftwilley:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Author Comment by robjeeves:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Assisted Solution by weellio:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Expert Comment by weellio:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 

Rank: Guru

Accepted Solution by cquinn:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 

Rank: Guru

Expert Comment by cquinn:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Author Comment by robjeeves:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
Loading Advertisement...
20080924-EE-VQP-41 / EE_QW_2_20070628