formatting numbers (1 Viewer)

abenitez77

Registered User
Joined
Apr 29, 2010
Messages
127
I have a report that is using a query where I have a column being formatted in the query like this:
CreditMemoAmt: "- " & CStr(Abs([CreditMemoAmount]))

In the report, numbers like 1,500.00 are coming across like 1500. And 1623,60 are 1623.6

How can i fix this? I want the numbers to appear like this:
-$1,500.00 or ($1,500.00)
- $1,623.60 or ($1,623.60)

thanks,
Alex
 

pbaldy

Wino Moderator
Staff member
Joined
Aug 30, 2003
Messages
33,669
Try

Format(Abs([CreditMemoAmount]), "Currency")
 

Galaxiom

Super Moderator
Staff member
Joined
Jan 20, 2009
Messages
11,833
Code:
Format(Abs([CreditMemoAmount] "($#,###.00)")
Code:
Format(Abs([CreditMemoAmount] "- $#,###.00")
 

abenitez77

Registered User
Joined
Apr 29, 2010
Messages
127
Code:
Format(Abs([CreditMemoAmount] "($#,###.00)")
Code:
Format(Abs([CreditMemoAmount] "- $#,###.00")

This worked! I just had to add a missing comma and parens:

Code:
Format(Abs([CreditMemoAmount][COLOR="Red"]),[/COLOR] "- $#,###.00")
Thanks!
 

Galaxiom

Super Moderator
Staff member
Joined
Jan 20, 2009
Messages
11,833
This worked! I just had to add a missing comma and parens:

Code:
Format(Abs([CreditMemoAmount][COLOR="Red"]),[/COLOR] "- $#,###.00")
Thanks!
Whoops, I pasted the name of your field in and must have accidentally got the missing characters when I selected what I replaced.

Glad it didn't stop you succeeding.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom