A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Writing numbers as alpha



 
 
Thread Tools Display Modes
  #1  
Old August 29th, 2007, 03:54 PM posted to microsoft.public.access.queries
Dudley
external usenet poster
 
Posts: 68
Default 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  
Old August 29th, 2007, 04:00 PM posted to microsoft.public.access.queries
Allen Browne
external usenet poster
 
Posts: 11,706
Default 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  
Old August 29th, 2007, 04:03 PM posted to microsoft.public.access.queries
Stefan Hoffmann
external usenet poster
 
Posts: 709
Default 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  
Old August 31st, 2007, 04:12 PM posted to microsoft.public.access.queries
Dudley
external usenet poster
 
Posts: 68
Default 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  
Old September 3rd, 2007, 01:48 PM posted to microsoft.public.access.queries
Stefan Hoffmann
external usenet poster
 
Posts: 709
Default 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  
Old September 6th, 2007, 03:08 PM posted to microsoft.public.access.queries
Dudley
external usenet poster
 
Posts: 68
Default 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  
Old September 6th, 2007, 03:28 PM posted to microsoft.public.access.queries
Stefan Hoffmann
external usenet poster
 
Posts: 709
Default 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  
Old September 7th, 2007, 09:50 AM posted to microsoft.public.access.queries
Dudley
external usenet poster
 
Posts: 68
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:43 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.