Solved

Null

Posted on 2009-06-30
3
226 Views
Last Modified: 2013-11-25
How can i make a "nul" value to number "0"
here's my code
!QUANTITY = !QUANTITY + QTY
it will become error once !Quantity is null. I need to convert null to "0"
Thanks!
0
Comment
Question by:Whing Dela Cruz
  • 2
3 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 24747129
something like this:
if IsNull(!QUANTITY) then
   !QUANTITY = QTY
else
   !QUANTITY = !QUANTITY + QTY
endif

Open in new window

0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 250 total points
ID: 24747136
or:

   !QUANTITY = iif(IsNull(!QUANTITY), 0, !QUANTITY) + QTY

Open in new window

0
 

Author Closing Comment

by:Whing Dela Cruz
ID: 31598404
Thank you sir!
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

808 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