I have an unbound field which I want to display the largest value found in several other unbound fields. ie.
FieldD = which value is larger, FeildA, FieldB or FieldC
=Switch([Field1]>[Field2] and [Field1]>[Field3],[Field1], [Field2]>[Field1] and [Field2]>[Field3],[Field2], [Field3]>[Field1] and [Field3]>[Field1],[Field3])
this expression in the Control Source should do it.
Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]
There is only one problem with this solution: If all values are equal then no value is selected as the highest value. Is there a way to select one of the equal values?
=Switch([Field1]>[Field2] and [Field1]>[Field3],[Field1], [Field2]>[Field1] and [Field2]>[Field3],[Field2], [Field3]>[Field1] and [Field3]>[Field1],[Field3], True, [Field1])
You see if none of the first three expressions are valid then they must all be the same so the fourth expression(True), returns the value of [Field1].
Let me know if this is what you want.
Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.