Change report Text to show Negatives in ()

J

James

Can't seem to find the option. Currently negatives are being displayed
as -123
Want them to show up as (123)
Anyone know how to set this for a report?
 
K

KARL DEWEY

You can use an IIF statement like this --
My_Cost: IIF([YourField] <0, "(" & Abs([YourField]) & ")", [YourField])
 
K

Ken Sheridan

Access includes built in formatting for this. You can even change the colour
of negative values. For instance setting the Format property of a control as
follows formats it as GBP with negative amounts parenthesised and in red,
with a comma as the thousands separator character for amounts over £999.99:

£#,###.00;[Red](£#,###.00);£#,##0.00

The first is for positive values, the second for negatives and the third for
zeros (you can also add a fourth for Nulls if you wish).

Ken Sheridan
Stafford, England
 

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