Microsoft KB Archive/308631

= ACC2000: Adding the Values of Fields Returns a Blank Result If Some of the Fields Contain Null Values =

Article ID: 308631

Article Last Modified on 6/29/2004

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q308631



Novice: Requires knowledge of the user interface on single-user computers.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).



SYMPTOMS
When you try to add the values of two fields in a database, and one of the fields contains null values in a few records, the result of the calculation for those records appears blank (null).



CAUSE
This behavior occurs because the result of a calculation that involves a null value is also null. A null value is not the same as a value of zero (0); instead, think of a null value as an unknown value. Adding an unknown value to a number yields an unknown result.



RESOLUTION
To work around this behavior, create an expression that uses the Nz function to convert null values to zeros, for example, (Nz([Field1])+Nz([Field2]))



MORE INFORMATION
For more information about handling null values, either search the Access Help index for &quot;blank fields, null values&quot;, or ask the Access 2000 Office Assistant.

Additional query words: prb

Keywords: kbprogramming kbprb KB308631

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.