Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Simon Arnold
  Where is Simon Arnold?
 Halifax
 United Kingdom
 Simon Arnold
 To: munir hossain
  Where is munir hossain?
 dhaka
 Bangladesh
 munir hossain
 Tags
Subject: RE: NULL VALUE
Thread ID: 16241 Message ID: 16243 # Views: 1 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Sunday, October 13, 2002 9:04:25 PM         
   


> HI EXPERT,
> HAVE NEW PROB NOW.Something like
>
> TABLE1
>
> UNIT1 UNIT2 TOTAL_UNIT
>
> 1 2 3 (formula i use is unit1+unit2)
>
> .NULL. 3 .NULL. (i want 3 in result)
>
>
> Want add two colume of each record.But when one has .NULL. value the result also get null.
> how can i avoid .NULL. value.
> Please help me
> Thanks

Try this code to add values, checking to see if they contain NULL's, at the same time.

lnVal = IIF(ISNULL(Unit1),0,Unit1) + IIF(ISNULL(Unit2),0,Unit2) + IIF(ISNULL(Unit3),0,Unit3)


Simon Arnold.


ENTIRE THREAD

NULL VALUE Posted by munir hossain @ 10/13/2002 5:12:49 PM
RE: NULL VALUE Posted by Simon Arnold @ 10/13/2002 9:04:25 PM
RE: NULL VALUE Posted by Khalil Shaddad @ 10/14/2002 7:07:00 AM