Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IIF

Status
Not open for further replies.

diggadave

Programmer
Jun 22, 2003
9
GB
Hi

I have a report which will display a count of field. If it is zero, the report field is displayed as blank.

What I want is, if the query count is null, I want a zero to be displayed.

I thought that it wouls simply be a case of:-

=IIf([CountOfItem]>0,[CountOfItem],"0")

If anyone has any ideas, will be grateful for the help!

Best Wishes

Digga
 
I'm not sure - but do you need the quotes around the 0? Try taking those out and see if it works?
 
You say that if the results are NULL you want to insert a 0....

I would try one of the following instead of what you currently have:

=Nz([CountOfItem], 0)
=IIF(IsNull([CountOfItem]), 0, [CountOfItem])

Both of these look for NULL....and replace it with a 0.

****************************
Only two things are infinite, the universe and human stupidity,
and I'm not sure about the former. (Albert Einstein)

Robert L. Johnson III
MCSA, CNA, MCP, Network+, A+
w: robert.l.johnson.iii@citigroup.com
h: wildmage@tampabay.rr.com
 
Hi

Thanks for that, but it is still giving me a #Error instead of the result that I want!

Any ideas?

Digga
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top