Advanced Expression Help Needed

dogman01

Registered User.
Local time
Today, 18:03
Joined
Dec 3, 2008
Messages
47
I have a field named "value" and need it to compare itself to another field that holds its "value limit" and another field that is a "plus or minus value". I am trying to do a conditional formating that turns the "value" field to a red color of it is not withing limit guidelines. For example:
"value"=3.2
"value limit"= 3.0
"plus or minus"= 0.1
Result I would want is 3.2
The value is out of limit.

Hope I explained this right, Thanks in advance
 
if abs([value]-[value limit])>[plus or minus] then
[value].forecolor = vbred
else
[value].forecolor = vbblack
end if


notes
1, you need square bracket syntax for fields with spaces
2, i think its forecolor (might be fgcolor)
3, not advised to use [value] for a field, as its a reserved word, i would think
 

Users who are viewing this thread

Back
Top Bottom