Query that returns 0 instead of null

A

aine_canby

Hi,

I have a query that returns two columns. Some of the fields in the
second column contain null (are blank). How do I get these to return 0
instead, using the criteria option.

Thanks,

Aine
 
J

John Spencer

Field: NoBlanks: IIF([Field] is Null, 0, [Field])

Or using the VBA function Nz

Field: NoBlanks: Nz([Field],0)



--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

scubadiver said:
Try this

Expr1: IIF([FIELD]="", 0, [FIELD])

--
"Loose Change 2nd Edition" has been seen by almost 7 million people on
Google video


Hi,

I have a query that returns two columns. Some of the fields in the
second column contain null (are blank). How do I get these to return 0
instead, using the criteria option.

Thanks,

Aine
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top