Return Zero Value

Haynesey

Registered User.
Local time
Today, 00:35
Joined
Dec 19, 2001
Messages
190
Hi,

In a query, I am using the following code to return the average length of each tenancy. This works fine unless the length is 0. If so, it only brings back 'blank'. How can I change this code to return a 0 value?

Tenure Length AVG: IIf([Average Tenure Length]>0,Format([Average Tenure Length],"Fixed",Format(0,"Fixed")))

Thanks in advance

Lee
 
Tenure Length AVG: IIf([Average Tenure Length]>0,Format([Average Tenure Length],"Fixed"),Format(0,"Fixed"))

You put the parentheses in the wrong place.
 
Thanks, that worked great.

Cheers

Lee
 

Users who are viewing this thread

Back
Top Bottom