Re: =Abs Zero error in my code?



Where you may be having a problem is that the equation Null>0 returns Null,
not false. Also, once one of the values returns Null, the value of the
addition will be Null. The general rule is Null will propagate through an
equation. Try wrapping each field in Nz().

=Abs((Nz([Additional Sample],0)>0)+(Nz([Additional Sample
#2],0)>0)+(Nz([Additional Sample #3],0)>0)+(Nz([Additional Sample
#4],0)>0)+(Nz([Additional Sample #5],0)>0)+(Nz([Additional Sample
#6],0)>0)+(Nz([Additional Sample #7],0)>0)+(Nz([Additional Sample
#8],0)>0)+(Nz([Additional Sample #9],0)>0)+(Nz([Additional Sample
#19],0)>0))


--
Wayne Morgan
MS Access MVP


"Dave Elliott" <dave@xxxxxxxxxxxxxxxxxx> wrote in message
news:VHRbe.1184$m85.802@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>I need this formula to show a 0 if if the values equal 0
> right now if it is > than 0 it works but not if less than 1
> then I get #num! error message
>
>
>
>
>
>
> =Abs(([Additional Sample]>0)+([Additional Sample #2]>0)+([Additional
> Sample #3]>0)+([Additional Sample #4]>0)+([Additional Sample
> #5]>0)+([Additional Sample #6]>0)+([Additional Sample #7]>0)+([Additional
> Sample #8]>0)+([Additional Sample #9]>0)+([Additional Sample #19]>0))
>


.



Relevant Pages

  • Re: General Import Error
    ... <MS ACCESS MVP> ... > I'm getting an error message when I try to import the data from an excel ... > I've been over and over and over my fields in the spreadsheet and my ... Prev by Date: ...
    (microsoft.public.access.externaldata)
  • Re: SumIf help needed plz...
    ... I entered it like this and now I get a #NUM! ... error message. ... miwarren's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=24682 ... Prev by Date: ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Sudden keyboard problems after upgrade from RH9 to FC2
    ... >> toggle the num or caps locks. ... >> and no longer get the error message. ... selected to download the source packages. ...
    (Fedora)
  • Re: Different Users for Access 2000
    ... The example you found on Joan's website is merely that, ... MS Access MVP ... Access Security: www.ltcomputerdesigns.com/Security.htm ... >> However I got prompted an error message when I was ...
    (microsoft.public.access.security)
  • Re: Incorrect err returned to caller when cancel and show MsgBox in BeforeUpdate
    ... > Since you're opeening to the newrecord, perhaps you can check for that ... > to trying to execute the save, which should suppress the error message. ... > Steve Clark, Access MVP ... >> This occurs when the data entry form has been opened ...
    (microsoft.public.access.formscoding)