Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Currency Value in a Text Object

Status
Not open for further replies.

furlman41

MIS
Sep 25, 2002
18
US
When I put a currency value in a text object with a string value, the currency value is displayed different than the rest of the values.

If it was a database currency object it would be displayed as:
$ 325.67

However, when I put the database currency object and a comment into a text object. Now, the text object doesn't have a space after the dollar sign:
$325.67 (estimated)

Any way to make this display with a space after the dollar sign so all my values are consistent?

John
 
Hi
you can create a formula and use CDbl function to convert currency field to a number field in the formula editor as follows:

'$' + CStr(CDbl({currency_field}))

cheers

pgtek
 
hi
i gave u the wrong answer
here the one

insert your field in the text box
after hit the space bar and then add (comment)
you should have a space inserted
if not
create formula

@Example
currency_field + " " + "(comment)"

this should work also

cheers

pgtek
 
hi
or try this one
create formula

@Example
"$" + " " + right({currency_field},5) + " " + "(comment)"

this should work also
 
pgtek-

Creating a formula didn't work, but the first response you gave to me did the job, although a little bit cumbersome.

'$' + CStr(CDbl({currency_field}))

Thanks.

Also, I couldn't use the formula with
"right({currency_field},5)"
because the currencies are not always 5 long.

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top