Solved

Null

Posted on 2009-06-30
3
224 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
Comment Utility
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
Comment Utility
or:

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

Open in new window

0
 

Author Closing Comment

by:Whing Dela Cruz
Comment Utility
Thank you sir!
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

772 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

11 Experts available now in Live!

Get 1:1 Help Now