Alter text colour depending on value (1 Viewer)

Mark-BES

Registered User.
Local time
Yesterday, 21:49
Joined
Nov 23, 2004
Messages
85
Hi,

I am building a stock control database. I have a form called [products]. On this form are two fields. One called [ProdReorder], the other [UnitsOnHand].

[UnitsOnHand] is displayed form a subform called [ProductsSubform].

What I want to know is: What code would I enter (& where) so if the [UnitsOnHand] value is less than the [ProdReorder] value it will display the value in red?

Eg: Reorder value is 5
I have 10 motors on stock (UnitsOnHand) = Text is black.
If I have 4 motors on stock = Text is Red.

How can this be done? any advice welcome. PS. my vba skills are weak.
 

meanster99

Meum cerebrum nocet!
Local time
Today, 05:49
Joined
May 2, 2006
Messages
62
You dont necessarily need to use vba for this - you could use conditional formatting.

Select [UnitsOnHand] and then choose conditional formatting (format menu). It should be self explanatory but you will need to enter :

Field Value Is Less Than [ProdReorder] (and color it how you want)

HTH
 

Mark-BES

Registered User.
Local time
Yesterday, 21:49
Joined
Nov 23, 2004
Messages
85
Thanks but sorry forgot to mention i'm still using old A97. Don't think this option is available. Any alternatives or is is called/found elsewhere?

Thanks again.
 

Users who are viewing this thread

Top Bottom