Writing numbers as alpha

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

Guest

I produce mail merge documents using an Access query, and I need to write
numbers as alpha, eg 100 as ONE HUNDRED. Can anyone advise how to do this?

Thanks for any help.
Dudley
 
Thanks very much to Allen Browne and Stefan Hoffman for your help.

Unfortunately, the codes you recommend are beyond my knowledge to use. Would
it be possible to adapt code for a command button Private Sub Command as

Me.ShareNumberAlpha = Me.ShareNumber .......

And if so any advice on how to do this would be gratefully received.

Dudley

PS sorry I now see that I was wrong to put my question under the queries
heading.
 
hi Dudley,
Unfortunately, the codes you recommend are beyond my knowledge to use.
Create a new standard modul and copy the code from Allens link (it's the
better one).
it be possible to adapt code for a command button Private Sub Command as
Me.ShareNumberAlpha = Me.ShareNumber .......

Me![ShareNumberAlpha] = Englsih(Me![ShareNumber])

I'm using

Me![fieldName] = ...

when working with the fields. When I'm working with controls I rename
them first, e.g. txtFieldName for a TextBox or cboFieldName for a
ComboBox. Then I use

cboFieldName.Value = ...

This makes code reading much easier.

mfG
--> stefan <--
 
Hi Stefan,

Many thanks for your help. I have copied the code as you advised and put in
the private sub

Me![Share1Alpha] = UCase(English(Me![Shareholder1ShareNumber]))

This gives 'ONE HUNDRED EXACTLY'. I cannot see how to get rid of the
'EXACTLY' Can you advise?

Thanks
Dudley

Stefan Hoffmann said:
hi Dudley,
Unfortunately, the codes you recommend are beyond my knowledge to use.
Create a new standard modul and copy the code from Allens link (it's the
better one).
it be possible to adapt code for a command button Private Sub Command as
Me.ShareNumberAlpha = Me.ShareNumber .......

Me![ShareNumberAlpha] = Englsih(Me![ShareNumber])

I'm using

Me![fieldName] = ...

when working with the fields. When I'm working with controls I rename
them first, e.g. txtFieldName for a TextBox or cboFieldName for a
ComboBox. Then I use

cboFieldName.Value = ...

This makes code reading much easier.

mfG
--> stefan <--
 
hi Dudley,
This gives 'ONE HUNDRED EXACTLY'. I cannot see how to get rid of the
'EXACTLY' Can you advise?
Search for

--
If (Frac = 0@) Then
Buf = Buf & " exactly"
--

in your source, replace " exactly" with " " (one space in qoutes).



mfG
--> stefan <--
 
Hi Stefan,

Perfect. Thanks very much.

Dudley

Stefan Hoffmann said:
hi Dudley,

Search for

--
If (Frac = 0@) Then
Buf = Buf & " exactly"
--

in your source, replace " exactly" with " " (one space in qoutes).



mfG
--> stefan <--
 
Back
Top