Solved

Null Field Equals Zero In Access

Posted on 2007-12-03
4
432 Views
Last Modified: 2012-06-21
I have an Access table with 4 columns  I am using an expression to sum two of the columns to update my totals columns.  However  I need to populate the null fields of one of the columns that is being summed with zero so the math will work.  How can that be done?  Thanks.
0
Comment
Question by:submarinerssbn731
[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
4 Comments
 
LVL 66

Accepted Solution

by:
Jim Horn earned 50 total points
ID: 20396328
Nz(YourColumnNameGoesHere, 0) will convert any null values to zero.

0
 
LVL 16

Expert Comment

by:Rick_Rickards
ID: 20396345
SELECT Nz(Field1,0), Nz(Field2,0), Nz(Field3,0), Nz(Field4,0) FROM tblMyTable;
0
 
LVL 16

Expert Comment

by:Rick_Rickards
ID: 20396357
Smile, looks like Jim beat me to the post.
0
 

Author Closing Comment

by:submarinerssbn731
ID: 31412359
It did convert the null fields to zero but the query only returned the records with null fields.  I want to return all rows when I run the query.
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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

623 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