How would my database write a number with letters?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i would like the results of a querie to be written as number f.e. 3 and also
as text f.e. three. How can i do that?(if you confused with anything i haved
said i mean my database must write a number with two ways as f.e 3 and
three.)Please i dont know what to do in that occasion...i am looking forward
for your answer..thank u
 
i would like the results of a querie to be written as number f.e. 3 and also
as text f.e. three. How can i do that?(if you confused with anything i haved
said i mean my database must write a number with two ways as f.e 3 and
three.)Please i dont know what to do in that occasion...i am looking forward
for your answer..thank u

I'm not sure of what number values you expect, but perhaps this is
what you are looking for.
To convert 123 to OneTwoThree ....

Copy and Paste the following into a Module:

Function Converting(NumIn)
' Convert numbers to their individual word.
If IsNull(NumIn) Then Exit Function
Dim intY As Integer
Dim strString As String
Dim intX As Integer
For intX = 1 To Len(NumIn)
intY = Mid(NumIn, intX, 1)
If intY = 0 Then
intY = 10
End If
strString = strString & Choose(intY, "One", "Two",
"Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Zero")
Next intX
Converting = strString

End Function

When ever you want to change number value of a field to it's text
equivalent, call it from an unbound control:

=Converting([FieldName])

If you are looking for the value of 123 to print as One Hundred
Twenty-three then see the example at
https://www.mvps/org
you were given by some one else earlier.
 
Back
Top