Solved

Null

Posted on 2009-06-30
3
225 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 69

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 69

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Determine Range to Select 5 43
Using "ScreenUpdating" 6 55
Adding to a VBA? 6 63
How to set the row selection as it was prior leaving the datagrid in vb6 3 35
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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
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…

863 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now