DeveloperBarn Forums

DeveloperBarn

Programming & IT forum

Converting Null Values to Zero

This is a discussion on Converting Null Values to Zero within the Microsoft Access forums, part of the Databases category; Trying to change null data to zero using an iif statement. ultimately what I am trying to do is have ...

Go Back   DeveloperBarn Forums > Databases > Microsoft Access

  #1  
Old September 2nd, 2008, 03:05 PM
Barn Regular
 
Join Date: Jul 2008
Location: Philadelphia, PA
Posts: 94
Rep Power: 2
nboscaino is an unknown quantity at this point
Default Converting Null Values to Zero

Trying to change null data to zero using an iif statement.

ultimately what I am trying to do is have a current readout of the amount that is in a checking account.

I am trying to do this using select queries. There are 4 catagories. Expenses, Income, Transfer In, Transfer Out

I made 4 queries to find those catagories totals and they are:

QryPriChkgExpTot
QryPriChkgIncTot
QryPriChkgTranInTot
QryPriChkgTranOutTot

I found that in my dummy data that I neglected to put a transfer in and so when I ran that query it continues to come empty. Consequently anything i run using that data doesnt treat it as 0 so further down the line I get an empty as well. I tried to handle this with an iif statement and it doesnt work. Any suggestions

particularlly pay attention to QryPriChkgTranInTot and see how it doesnt have a value when run. I considered this to be a null. Am I mistaken?
Attached Files
File Type: zip LifeManagement2.zip (48.8 KB, 5 views)
Reply With Quote
  #2  
Old September 3rd, 2008, 07:12 PM
Barn Newbie
 
Join Date: Mar 2008
Posts: 31
Rep Power: 2
RuralGuy is on a distinguished road
Default

Just use the Nz() function.

Comments on this post
jmurrayhead agrees: indeed
Reply With Quote
  #3  
Old September 4th, 2008, 09:08 AM
Barn Regular
 
Join Date: Jul 2008
Location: Philadelphia, PA
Posts: 94
Rep Power: 2
nboscaino is an unknown quantity at this point
Default

with such a strong approval of the Nz funct ill have to most certainly do that. I hope the help on it is somewhat complete. Thanks guys
Reply With Quote
  #4  
Old September 4th, 2008, 01:02 PM
Barn Newbie
 
Join Date: Mar 2008
Posts: 31
Rep Power: 2
RuralGuy is on a distinguished road
Default

Just post back here if you need more assistance. Pleanty of people willing to help.
Reply With Quote
Reply

  DeveloperBarn Forums > Databases > Microsoft Access

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Conversion failed when converting the varchar error guddu Microsoft SQL Server 9 July 17th, 2008 11:08 AM
finding values todd2006 ASP Development 2 June 23rd, 2008 02:03 AM
retrieve values todd2006 SQL Development 5 June 19th, 2008 01:46 PM
Data is Null. This method or property cannot be called on Null values. Shem .Net Development 8 June 17th, 2008 09:39 AM
Return Default Date If Null jmurrayhead SQL Development 16 June 8th, 2008 10:30 PM


All times are GMT -4. The time now is 02:32 AM.


Copyright ©2008-2010, DeveloperBarn

Content Relevant URLs by vBSEO 3.3.2