Eliminating Nulls

S

Sharon

I need to eliminate nulls in my tables in order to perform
calculations. I am currently creating a new column in my
queries and using the following type of query.

ExceptionSum: IIf(IsNull([ExcpSum]),0,[ExcpSum])

The problem is that it becomes cumberson when I have many
fields that require this procedure.

How can I use VB to perform this task for an entire table
instead of long-winded querries?
 
S

Sandra Daigle

Try using the Nz function instead, just embed it within your calcuation:

Z: nz([ExcpSum],0)*[Field2])

If you *always* convert nulls to zero (hence the nulls have no meaning) just
set the default value of the fields to 0 instead of null and then run an
update query on the table to convert all null to 0. Only do this if you are
not ever distinguishing between z null and a zero. Otherwise, use the Nz
Function.
 
A

Alfred

Hi
You can use the is null function to test and the update query to replace it
with zero's
Why don't you prefent this problem by using default values in your table or
forms.
alfred
 

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