Solved

Null

Posted on 2009-06-30
3
229 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
[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
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Updates not working for MS Windows 7 12 192
Copy a row 12 69
Convert VB6 MSXML2.ServerXMLHTTP process to C# 2 66
Exit a vb6 apps when a calling it apps closes 15 57
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

740 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