changing field format based on variable value of another field

nnej

Registered User.
Local time
Today, 06:55
Joined
Jun 10, 2008
Messages
15
I just spent an hour searching on this and didn't see anything - sorry if it's a duplicate!

I have a form and subform. The form has basic info related to a client, one field is "total volunteer hours required" (totreqhrs). The subform has individual records of each volunteer appointment including a field with hours for that appointment (volhrs). The form has a field which sums the hours in the individual records (sum([volhrs]).

If the "sum([volhrs])" field calculates to equal to or greater than the "totreqhrs" field, I want EITHER the totreqhrs or the "sum([volhrs])" field to turn green. It doesn't really matter which as long as one of them turns green. I know the conditional formatting function allows for "field value greater than or equal to" but I am not clear how to put a field value in the conditional formatting criteria box (as opposed to a straight number like 100, which I can get to work just fine - trouble is required hours vary by client so this needs to be more dynamic).

I tried entering [tothrs] in the criteria box for a conditional format on the "sum([volhrs])" field and when I change the view to form view, I get "NAME##" error in the "sum([volhrs]) field...

Any help is appreciated!
 
So put a hidden textbox on your form that does the subtraction and have the conditional formatting set the color when the hidden value is 0.
 
Duh. Thanks, that worked perfectly. :o
 

Users who are viewing this thread

Back
Top Bottom