Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2014-02-28
2
Medium Priority
?
364 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 14

Accepted Solution

by:
luconsta earned 2000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

721 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