Format for currency

R

rbeach

Does anyone know how to change a currency sewt as "$1,111.11" to "One
Thousand One Hundred Eleven Dollars and 11/100" format?
 
R

rbeach

I created a module named "CurrencyToText" and copied this code into it. I
have a textbox named "GrandTotal" on a report named "FormalQuote" that I need
to be reformatted. How is the module called to reformat this textbox number?
 
J

John Spencer

You need an expression like the following

English(Int([SomeFieldName]) & " and " &
Format([SomeFieldName]-Int([SomeFieldName],"00") & "/100"

If you want to use that as the control's source then put an equal sign in
front of it AND make sure the control does not have the same name as the field.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
R

rbeach

John,

I entered the below and received a syntax error stating it has the wrong
number of arguements. I receive this even utilizing the equal sign in front
of the formula. Please help.

English(Int([GrandTotal]) & " and " &
Format([GrandTotal]-Int([GrandTotal],"00") & "/100"
--
Rick


John Spencer said:
You need an expression like the following

English(Int([SomeFieldName]) & " and " &
Format([SomeFieldName]-Int([SomeFieldName],"00") & "/100"

If you want to use that as the control's source then put an equal sign in
front of it AND make sure the control does not have the same name as the field.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
I created a module named "CurrencyToText" and copied this code into it. I
have a textbox named "GrandTotal" on a report named "FormalQuote" that I need
to be reformatted. How is the module called to reformat this textbox number?
 
R

rbeach

I have this working properly. Thanks for everyones assistance. It is greatly
appreciated.
--
Rick


rbeach said:
John,

I entered the below and received a syntax error stating it has the wrong
number of arguements. I receive this even utilizing the equal sign in front
of the formula. Please help.

English(Int([GrandTotal]) & " and " &
Format([GrandTotal]-Int([GrandTotal],"00") & "/100"
--
Rick


John Spencer said:
You need an expression like the following

English(Int([SomeFieldName]) & " and " &
Format([SomeFieldName]-Int([SomeFieldName],"00") & "/100"

If you want to use that as the control's source then put an equal sign in
front of it AND make sure the control does not have the same name as the field.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
I created a module named "CurrencyToText" and copied this code into it. I
have a textbox named "GrandTotal" on a report named "FormalQuote" that I need
to be reformatted. How is the module called to reformat this textbox number?
 
J

John W. Vinson

John,

I entered the below and received a syntax error stating it has the wrong
number of arguements. I receive this even utilizing the equal sign in front
of the formula. Please help.

Just missing a parenthesis or two:

English(Int([GrandTotal])) & " and " &
Format([GrandTotal]-Int([GrandTotal]),"00") & "/100"

Int() is a function, and its argument must be surrounded by a left and a right
parenthesis.
 

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