highlight negative number in report?

T

triplespiral

I have a report that lists totals (currency) and a field that notes the
difference between the two dates - is there a way to highlight (make red for
example) the fields that have a negative number?

Cheers
L
 
J

John Spencer

You can use the format property of the control. Or you can use VBA code if
you want to do bolding, italics, etc. Or you can use conditional formatting
if you are using Access 2000 or later.

Easiest way to do what you stated is to use the format property of the
control.
From Access97 Help file:
=======================================================
Custom Formats

Custom number formats can have one to four sections with semicolons (;) as
the list separator. Each section contains the format specification for a
different type of number.

Section Description
First The format for positive numbers.
Second The format for negative numbers.
Third The format for zero values.
Fourth The format for Null values.
For example, you could use the following custom Currency format:

$#,##0.00[Green];($#,##0.00)[Red];"Zero";"Null"

This number format contains four sections separated by semicolons and uses a
different format for each section.
If you use multiple sections but don't specify a format for each section,
entries for which there is no format either will display nothing or will
default to the formatting of the first section.
You can create custom number formats by using the following symbols.
=======================================================

If you don't want the green color for positive numbers then just drop
"[Green]" from the format.
 
T

triplespiral

Thank you sooo much! Cheers

John Spencer said:
You can use the format property of the control. Or you can use VBA code if
you want to do bolding, italics, etc. Or you can use conditional formatting
if you are using Access 2000 or later.

Easiest way to do what you stated is to use the format property of the
control.
From Access97 Help file:
=======================================================
Custom Formats

Custom number formats can have one to four sections with semicolons (;) as
the list separator. Each section contains the format specification for a
different type of number.

Section Description
First The format for positive numbers.
Second The format for negative numbers.
Third The format for zero values.
Fourth The format for Null values.
For example, you could use the following custom Currency format:

$#,##0.00[Green];($#,##0.00)[Red];"Zero";"Null"

This number format contains four sections separated by semicolons and uses a
different format for each section.
If you use multiple sections but don't specify a format for each section,
entries for which there is no format either will display nothing or will
default to the formatting of the first section.
You can create custom number formats by using the following symbols.
=======================================================

If you don't want the green color for positive numbers then just drop
"[Green]" from the format.

triplespiral said:
I have a report that lists totals (currency) and a field that notes the
difference between the two dates - is there a way to highlight (make red
for
example) the fields that have a negative number?

Cheers
L
 
M

Mary

I just used this formatting successfully, but the controls aren't
right-aligned with the other currency controls even though they're set to be
right-aligned. Do I need to add code for this? If so, how?

Thanks,
Mary

John Spencer said:
You can use the format property of the control. Or you can use VBA code if
you want to do bolding, italics, etc. Or you can use conditional formatting
if you are using Access 2000 or later.

Easiest way to do what you stated is to use the format property of the
control.
From Access97 Help file:
=======================================================
Custom Formats

Custom number formats can have one to four sections with semicolons (;) as
the list separator. Each section contains the format specification for a
different type of number.

Section Description
First The format for positive numbers.
Second The format for negative numbers.
Third The format for zero values.
Fourth The format for Null values.
For example, you could use the following custom Currency format:

$#,##0.00[Green];($#,##0.00)[Red];"Zero";"Null"

This number format contains four sections separated by semicolons and uses a
different format for each section.
If you use multiple sections but don't specify a format for each section,
entries for which there is no format either will display nothing or will
default to the formatting of the first section.
You can create custom number formats by using the following symbols.
=======================================================

If you don't want the green color for positive numbers then just drop
"[Green]" from the format.

triplespiral said:
I have a report that lists totals (currency) and a field that notes the
difference between the two dates - is there a way to highlight (make red
for
example) the fields that have a negative number?

Cheers
L
 

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