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

x
?
Solved

Null

Posted on 2009-06-30
3
Medium Priority
?
234 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 1000 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

Technology Partners: 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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

660 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