Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 239
  • Last Modified:

Null

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
Whing Dela Cruz
Asked:
Whing Dela Cruz
  • 2
1 Solution
 
Éric MoreauSenior .Net ConsultantCommented:
something like this:
if IsNull(!QUANTITY) then
   !QUANTITY = QTY
else
   !QUANTITY = !QUANTITY + QTY
endif

Open in new window

0
 
Éric MoreauSenior .Net ConsultantCommented:
or:

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

Open in new window

0
 
Whing Dela CruzAuthor Commented:
Thank you sir!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now