Calculating "Max" in a query

MickeyGreen

Registered User.
Local time
Today, 13:59
Joined
Apr 28, 2005
Messages
14
I put the following calculation in the query expression builder:

HighValue: Max([Field1],[Field2])

But I keep getting the following error message when I try to save it:

"The expression you entered has a function containing the wrong number of arguments"

Any ideas about what is wrong with my expression?
 
And you can use an IIF expression to return the higher value of the two:

HighValue: iif([Field1]>[Field2], [Field1], [Field2])


If [Field1] and [Feidl2] contain null values, you can use the Nz() function in the expression:

HighValue: IIf(Nz([Field1])>Nz([Field2]), [Field1], [Field2])
.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom