Writing numbers as alpha

D

Dudley

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
 
D

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.
 
S

Stefan Hoffmann

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 <--
 
D

Dudley

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 <--
 
S

Stefan Hoffmann

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 <--
 
D

Dudley

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 <--
 
Top