I have a big Module to convert numbers to words. for example "1230" after using the function is expressed as "One thousand two hundred and thirty".
it works good in MS Excell. I have copied the same VBA Code in a module in my access project.
In one form I tried to use the function , I can find it the Access user defined functions but when I run it, the function not called
N.B.: it is very big module, I tried ti pick a small portion for the "The ones number" that is working well
it works good in MS Excell. I have copied the same VBA Code in a module in my access project.
In one form I tried to use the function , I can find it the Access user defined functions but when I run it, the function not called
N.B.: it is very big module, I tried ti pick a small portion for the "The ones number" that is working well
Code:
Option Compare Database
Option Explicit
Public number_letter, number_word
Public Sub convert_number_word()
Dim first_Num, read_first
read_first = Left([number_letter], 1)
first_Num = Choose(read_first, "one", "two", "three", "four", "five", "six", "seven", "eight", "nine")
If Len([number_letter]) = 1 Then
[number_word] = first_Num
End If
End Sub
Function qweasd(Myno)
number_letter = Myno
convert_number_word
qweasd = number_word
End Function