In the database I'm building I need to change numbers into words (eg 200 into 'two hundred'), I have found a small Access module that does it great which works from a form. My problem is I want it to either work from a query or a report, not from a form. The form has a section of code as an event in the 'input' field which I guess is moving the data into the main module code and back again, after conversion, to the 'result' field of the same form. Do I need to transfer/edit this small section to somewhere else? If so where? I have enclosed the small section. [EnterDollars] is the label for the 'input' field and [ViewText] is the label for the 'result' field. Any help would be warmly received.
Code:
Option Compare Database 'Use database order for string comparisons
Option Explicit
Private Sub EnterDollars_AfterUpdate()
Dim Indollars As String
Indollars = Me![EnterDollars]
Me![ViewText] = ConvertToText(Indollars)
Forms![TestIt]![EnterDollars].SetFocus
' Me![ViewText] = "asdfas"
' ConvertToText (Me![EnterDollars])
End Sub