formatting numbers (1 Viewer)

abenitez77

Registered User.
Local time
Today, 16:41
Joined
Apr 29, 2010
Messages
141
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
Local time
Today, 13:41
Joined
Aug 30, 2003
Messages
36,118
Try

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

Galaxiom

Super Moderator
Staff member
Local time
Tomorrow, 07:41
Joined
Jan 20, 2009
Messages
12,849
Code:
Format(Abs([CreditMemoAmount] "($#,###.00)")

Code:
Format(Abs([CreditMemoAmount] "- $#,###.00")
 

abenitez77

Registered User.
Local time
Today, 16:41
Joined
Apr 29, 2010
Messages
141
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
Local time
Tomorrow, 07:41
Joined
Jan 20, 2009
Messages
12,849
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

Top Bottom