Access query that adds two columns where one is sometimes a null

Posted on 2014-02-28
Last Modified: 2014-02-28
I have this query:

Expr1: [TABLE]![COL1]+[TABLE]![COL2]

it's not working because sometimes either column can be a null, in that case I want it to treat the null like a 0 and add them anyways. Can I modify the query to do this?

Question by:Coaster_brook_trout
LVL 14

Accepted Solution

luconsta earned 500 total points
ID: 39895308
Use the NZ function:

Expr1: NZ([TABLE]![COL1],0)+NZ([TABLE]![COL2] ,0)

Author Closing Comment

ID: 39895313

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Export  Access Query To Excell 16 44
DSum for Access 6 43
Like Function in Query Dramatically Increasing Run Time 13 32
Getting Run-Time Error 13 - Type Mismatch 3 26
Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now