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

x
?
Solved

Null Field Equals Zero In Access

Posted on 2007-12-03
4
Medium Priority
?
438 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 200 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
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.

730 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