Change Null Data in a Field to Display 0 instead

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a Database query that whenever the results of the query are Null it doesn't display the results at all. I have tried using the "IIF(IsNull..." statement and get a compile error whenever I kick off the query with this statement in it. Where and how can I convert my "Null Data" fields to "0" so that they will display. I would accept displaying a blank but whenever the query encounters a null, it will not display any of my data from the other fields.
 
If your query returns no records then there are no nulls to convert to 0. If
this isn;t the case then please provide the SQL view of your query.

--
Duane Hookom
MS Access MVP


Tony said:
I have a Database query that whenever the results of the query are Null it
doesn't display the results at all. I have tried using the "IIF(IsNull..."
statement and get a compile error whenever I kick off the query with this
statement in it. Where and how can I convert my "Null Data" fields to "0"
so that they will display. I would accept displaying a blank but whenever
the query encounters a null, it will not display any of my data from the
other fields.
 
See:
The Query Lost My Records! (Nulls)
at:
http://allenbrowne.com/casu-02.html

The article discusses two causes: inner joins, and criteria that does not
include:
Or Is Null

Before you use an Update query to replace the nulls in your field with
zeros, see:
Nulls: Do I need them?
at:
http://allenbrowne.com/casu-11.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Tony said:
I have a Database query that whenever the results of the query are Null it
doesn't display the results at all. I have tried using the "IIF(IsNull..."
statement and get a compile error whenever I kick off the query with this
statement in it. Where and how can I convert my "Null Data" fields to "0"
so that they will display. I would accept displaying a blank but whenever
the query encounters a null, it will not display any of my data from the
other fields.
 
Use Nz([fieldname],0)


Duane Hookom said:
If your query returns no records then there are no nulls to convert to 0. If
this isn;t the case then please provide the SQL view of your query.

--
Duane Hookom
MS Access MVP


it
doesn't display the results at all. I have tried using the "IIF(IsNull..."
statement and get a compile error whenever I kick off the query with this
statement in it. Where and how can I convert my "Null Data" fields to "0"
so that they will display. I would accept displaying a blank but whenever
the query encounters a null, it will not display any of my data from the
other fields.
 
Back
Top