Conditional Formating

izen

Registered User.
Local time
Today, 19:30
Joined
Apr 2, 2009
Messages
50
Hi guys

I created the calculating qurey to find the percentage of food cost

% food cost = [ingredient cost]/[Selling Price]*100

the problem is I set the Selling Price = 0 as the default

So when the items that dont provide the selling price on the % food cost will show error, That's fine to me actually

However, I think its better if I can set the conditional formatting that if % food cost = error => font colour = white so the users dont see that error on the report or form. Can I do that ?

thank you

Zen
 
Hi guys

I created the calculating qurey to find the percentage of food cost

% food cost = [ingredient cost]/[Selling Price]*100

the problem is I set the Selling Price = 0 as the default

So when the items that dont provide the selling price on the % food cost will show error, That's fine to me actually

However, I think its better if I can set the conditional formatting that if % food cost = error => font colour = white so the users dont see that error on the report or form. Can I do that ?

thank you

Zen

You can set SellingPrice = Null and in the query have something like:

FC: Iif(IsNull(SellingPrice),Null,Pcntfoodcost = [ingredientcost]/[SellingPrice]*100)

If there is no SellingPrice then leave blank, otherwise (the formula).

Notice how I've removed all blank spaces and the % - good practise not to have any blanks in fld names or non alphabetic chars apart from underscore.

To get colour change you'll need to do this via a form.
 
thank you for your advice :)
 

Users who are viewing this thread

Back
Top Bottom