Conditional Color Formatting

G

Guest

I have a report with a field called Difference which is calculated by
[PriceOverride]-[PriceDefault] if the difference is more than two I want the
value display color to be red if it is less than or equal to two I want the
value display color to be black. How do I do that?

Thanks,

Scott
 
G

Guest

On the OnFormat property of the Detail section of your report put:

If me.Difference >2 then
Me.Difference.Forecolor= 128
Else
Me.Difference.Forecolor = 0
End If

The 128 indicates a "red" color. You can put any red color in that formula.

Hope this helps.
Jackie
 
F

fredg

I have a report with a field called Difference which is calculated by
[PriceOverride]-[PriceDefault] if the difference is more than two I want the
value display color to be red if it is less than or equal to two I want the
value display color to be black. How do I do that?

Thanks,

Scott



You can use Conditional Formatting.

Set the control's forecolor to Black.

Select that control.
Click on Format + Conditional Formatting
Set Condition1 to
Field Value Is
Select
less than or equal to
in the next drop down.
Then enter 2 as the value.

Select the Red forecolor color.
Save the changes.
 
G

Guest

Worked great, thank you!

fredg said:
I have a report with a field called Difference which is calculated by
[PriceOverride]-[PriceDefault] if the difference is more than two I want the
value display color to be red if it is less than or equal to two I want the
value display color to be black. How do I do that?

Thanks,

Scott



You can use Conditional Formatting.

Set the control's forecolor to Black.

Select that control.
Click on Format + Conditional Formatting
Set Condition1 to
Field Value Is
Select
less than or equal to
in the next drop down.
Then enter 2 as the value.

Select the Red forecolor color.
Save the changes.
 

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