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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I get a query to display 0's and not Null 1

Status
Not open for further replies.

Modex

Programmer
Sep 15, 2002
155
0
0
GB
Hi All,

I wonder if someone could please help me out of this dilema.

I have three queries each of these queries performes a count, basically one counts how many eipsodes there are in a TV series. The next Counts how many I have got and Finally the third counts how many I have not got.

I then start a new query when I add a query showing the series titles and then add in the three queries above. I link each of three queries to the query showing the series title.

The query works, however where I have not got any of the series or I have none missing, the results of the query show a null response rather than a numeric 0 response. This is my problem, I need it to display 0 rather than Null.

As Below

This is what I get

Title Total Got Missing
My Family 112 110 2
My Hero 20 20
Blackadder 54 53 1
Trouble 20 20
etc etc

What I would like is the following

Title Total Got Missing
My Family 112 110 2
My Hero 20 20 0
Blackadder 54 53 1
Trouble 20 0 20
etc etc

So basically, anyone know how these nulls can be displayed as 0's


Many thanks

Modex
 
Nz([fieldname],0) returns 0 if fieldname is null

Hope this helps.
 
Hi Earthandfire,

Thanks for that, worked a treat. I had to work out where best to place the code, but I got it working.

Excellent

Thanks

ModeX
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top