How can I make The Font Change Color when it is Negative?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to get it to Turn Red when the Entered Quantity is < the In Qty.

-The Novice
 
Add an event procedure to the AfterUpdate event of the [Entered Quantity]
control. Use this to evaluate/validate and, as appropriate, set the
backcolor.

Regards

Jeff Boyce
<Office/Access MVP>
 
Check help on Conditional Formatting

Open the form in design view, select the field you want to format, from the
menu bar select format > conditional formating

And enter the condition, to compare with another field, specify the other
field that compare it with as
[FieldName]
 
The conditional I have already, But what I am un-sure of is the Changing of
the color: in other words, any examples!?!?!

-The Novice

Ofer said:
Check help on Conditional Formatting

Open the form in design view, select the field you want to format, from the
menu bar select format > conditional formating

And enter the condition, to compare with another field, specify the other
field that compare it with as
[FieldName]
--
If I answered your question, please mark it as an answer. That way, it will
stay saved for a longer time, so other can benifit from it.

Good luck



TwinDad said:
I am trying to get it to Turn Red when the Entered Quantity is < the In Qty.

-The Novice
 
The conditional I have already, But what I am un-sure of is the Changing of
the color: in other words, any examples!?!?!

-The Novice

Ofer said:
Check help on Conditional Formatting

Open the form in design view, select the field you want to format, from the
menu bar select format > conditional formating

And enter the condition, to compare with another field, specify the other
field that compare it with as
[FieldName]
--
If I answered your question, please mark it as an answer. That way, it will
stay saved for a longer time, so other can benifit from it.

Good luck

TwinDad said:
I am trying to get it to Turn Red when the Entered Quantity is < the In Qty.

-The Novice

Your Subject line and your message text refer to 2 different criteria.
Changing a Font color when a control is negative is not the same as
changing it's font color when it is less than another control!

To change a controls font color if it is a negative amount, set it's
Format property to:
#[Black];-#[Red];0[Black]

Look up Format Property + Number and Currency Datatype in Access help
for more information.

To change a control's color depending upon whether or not it's value
is less than another control use conditional formatting (in Access
2000 or newer).

Select the [Entered Qty] control you wish to change the font color of.
Click on Format + Conditional Formatting
Set the Condition1 drop down to
Expression Is.
Write in the next dialog box:
[Entered Qty]<[In Qty]
Select the Font color from the font color drop-down.
Click OK

If you are using Access 97 or older you'll need to write some code.
Post back.
 
Thank you FredG, that was what I was looking for.

My apologies to all for the confusion.

-The Novice

fredg said:
The conditional I have already, But what I am un-sure of is the Changing of
the color: in other words, any examples!?!?!

-The Novice

Ofer said:
Check help on Conditional Formatting

Open the form in design view, select the field you want to format, from the
menu bar select format > conditional formating

And enter the condition, to compare with another field, specify the other
field that compare it with as
[FieldName]
--
If I answered your question, please mark it as an answer. That way, it will
stay saved for a longer time, so other can benifit from it.

Good luck

:

I am trying to get it to Turn Red when the Entered Quantity is < the In Qty.

-The Novice

Your Subject line and your message text refer to 2 different criteria.
Changing a Font color when a control is negative is not the same as
changing it's font color when it is less than another control!

To change a controls font color if it is a negative amount, set it's
Format property to:
#[Black];-#[Red];0[Black]

Look up Format Property + Number and Currency Datatype in Access help
for more information.

To change a control's color depending upon whether or not it's value
is less than another control use conditional formatting (in Access
2000 or newer).

Select the [Entered Qty] control you wish to change the font color of.
Click on Format + Conditional Formatting
Set the Condition1 drop down to
Expression Is.
Write in the next dialog box:
[Entered Qty]<[In Qty]
Select the Font color from the font color drop-down.
Click OK

If you are using Access 97 or older you'll need to write some code.
Post back.
 
Back
Top