If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Writing numbers as alpha
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 |
#2
|
|||
|
|||
Writing numbers as alpha
This article should show you how to approach the issue:
Convert Currency ($500) into words (Five Hundred Dollars) at: http://www.mvps.org/access/modules/mdl0001.htm -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Dudley" wrote in message ... 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 |
#3
|
|||
|
|||
Writing numbers as alpha
hi Dudley,
Dudley wrote: 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? http://vbnet.mvps.org/index.html?cod...mbertotext.htm mfG -- stefan -- |
#4
|
|||
|
|||
Writing numbers as alpha
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. "Stefan Hoffmann" wrote: hi Dudley, Dudley wrote: 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? http://vbnet.mvps.org/index.html?cod...mbertotext.htm mfG -- stefan -- |
#5
|
|||
|
|||
Writing numbers as alpha
hi Dudley,
Dudley wrote: 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 -- |
#6
|
|||
|
|||
Writing numbers as alpha
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" wrote: hi Dudley, Dudley wrote: 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 -- |
#7
|
|||
|
|||
Writing numbers as alpha
hi Dudley,
Dudley wrote: 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 -- |
#8
|
|||
|
|||
Writing numbers as alpha
Hi Stefan,
Perfect. Thanks very much. Dudley "Stefan Hoffmann" wrote: hi Dudley, Dudley wrote: 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 -- |
Thread Tools | |
Display Modes | |
|
|