Return Zero Value (1 Viewer)

Haynesey

Registered User.
Local time
Today, 09:28
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
 

boblarson

Smeghead
Local time
Today, 01:28
Joined
Jan 12, 2001
Messages
32,059
Tenure Length AVG: IIf([Average Tenure Length]>0,Format([Average Tenure Length],"Fixed"),Format(0,"Fixed"))

You put the parentheses in the wrong place.
 

Haynesey

Registered User.
Local time
Today, 09:28
Joined
Dec 19, 2001
Messages
190
Thanks, that worked great.

Cheers

Lee
 

Users who are viewing this thread

Top Bottom