convert currency to words

B

blackcat

i'm trying to convert a currency field ie £125.00 to a word field ie one
hundred and twenty five pounds, anyone know how to do this please. found
something about a data access page but i don't think this is the same thing
 
B

blackcat

thanks for your code, unfortunatly i'm not very experienced when it comes to
code like this, is there any way you could tell me which bits of the code i
need, i'm using a currency field call 'money' ie £ 1500, and i want the text
to display in a field called 'moneytext' ie one thousand and five hundred
pounds. sorry i know this is a bit of a check but i'm at a complete loss.

many thanks
 
G

Graham R Seach

Just copy the code from the webpage, and put it into a standard module.

Then, assuming the numeric representation you want to convert is sitting in
a textbox called, say, txtMoney, you can call the code like so:
Me!txtMoneyText = Num2Text(Me!txtMoney, ConvTypeCurrency,
CapProperCase_MinorLC)

In a query, assuming the table field you want to convert is called, say
[Money], you can call it in the QBE grid like so:
MoneyText: Num2Text([Money], 3, 4)

....which in SQL translates to:

SELECT Num2Text([Money], 3, 4) As MoneyText
FROM tblMyTable

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
---------------------------
 
B

blackcat

you are an absolute star, thank you very much

Graham R Seach said:
Just copy the code from the webpage, and put it into a standard module.

Then, assuming the numeric representation you want to convert is sitting in
a textbox called, say, txtMoney, you can call the code like so:
Me!txtMoneyText = Num2Text(Me!txtMoney, ConvTypeCurrency,
CapProperCase_MinorLC)

In a query, assuming the table field you want to convert is called, say
[Money], you can call it in the QBE grid like so:
MoneyText: Num2Text([Money], 3, 4)

....which in SQL translates to:

SELECT Num2Text([Money], 3, 4) As MoneyText
FROM tblMyTable

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
---------------------------

blackcat said:
thanks for your code, unfortunatly i'm not very experienced when it comes
to
code like this, is there any way you could tell me which bits of the code
i
need, i'm using a currency field call 'money' ie £ 1500, and i want the
text
to display in a field called 'moneytext' ie one thousand and five hundred
pounds. sorry i know this is a bit of a check but i'm at a complete loss.

many thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top