Keep in mind that she's asking for "dollars" but really wants
"SetPrecision()" where she's passing an amount and the precision.
You and Tom both assumed "2" for the precision, when this could be variable
if not really specifying "USD".
Beverly
On 4/2/07 2:13 PM, "Jason L. DeLooze" <[EMAIL PROTECTED]> wrote in whole
or in part:
> Hi Sue,
>
> Write yourself a Custom Function which takes TheAmount as a parameter and
> returns text formatted as you wish; such as the following:
>
> FormatAsDollars(TheAmount)
>
> Let(
> [
> RoundedCents = Round(100*TheAmount;0) ;
> Sign = Case(RoundedCents < 0 ; "-") ;
> RoundedCents = Abs(RoundedCents) ;
> DollarAmount = GetAsText( Div(RoundedCents;100) ) ;
> Cents = Right("00" & GetAsText( Mod(RoundedCents;100) );2)
> ] ;
> "$" & Sign & DollarAmount & "." & Cents
> )
>
> Regards,
> Jason L. DeLooze
> Annapolis, MD USA
>
>
>
>
> On 4/2/07 at 11:38 AM -0600, Sue wrote:
>> I have a calculated text field made up concantenated text and various number
>> fields.
>>
>> Some of these numbers I need to have show up in the final text as dollar
>> amounts with two decimal places.
>>
>> For example, I can concantenate in my calculation as follows:
>>
>> "Your current hourly pay is $" & (SetPrecision (currentpayfield;2))
>>
>> and get: Your current pay is $10.5
>>
>> but I want it to come out as: Your current hourly pay is $10.50
>>
>> Round and truncate don't solve the problem either.
>>
>> Any suggestions on how to correctly write this calculation so I can get the
>> desired result?
>>
>> Thanks!
>>
>> Sue