I have a report and want to make some calculations using the fields but one calculation I have to make requires choosing only the highest value out of three different fields and then adding that amount with five other fields.
If I understand the question, what you will need to do is put a conditional statement in the On_Format event of the section where the fields appear (Detail?).
Here's how I would do it.
Dim intHigh as Integer
intHigh = FirstValue
If SecondValue > intHigh Then
intHigh = SecondValue
End If
If ThirdValue > intHigh Then
intHigh = ThirdValue
End If
SumField = intHigh + Field1 . . . + Field5
Let me know if you have any questions or problems with this.
Larry De Laruelle
larry1de@yahoo.com
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.