Solved

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

Posted on 2014-02-28
2
358 Views
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?

Thanks!
0
Comment
Question by:Coaster_brook_trout
2 Comments
 
LVL 14

Accepted Solution

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

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

Author Closing Comment

by:Coaster_brook_trout
ID: 39895313
PERFECT, EXACTLY WHAT I WAS LOOKING FOR!!!!
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
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 different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

760 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

21 Experts available now in Live!

Get 1:1 Help Now