From: neil40 on
Hi

I have a Totals column in a report that adds a Points and Bonus Points
field using
=Nz([Points],0)+Nz([Bonus Points],0)

I would like to modify this so that if [Bonus Points] is empty (Null I
guess? - there would be no value at all) then the Total is left blank

I.E. 'If Bonus Points is blank, then Total is blank, else Points +
Bonus Points"

Struggling with my IIf statement, and would appreciate some guidance

Thanks
Neil
From: neil40 on
On 17 Apr, 00:49, "nei...(a)btinternet.com"
<neil.grant...(a)googlemail.com> wrote:
> Hi
>
> I have a Totals column in a report that adds a Points and Bonus Points
> field using
> =Nz([Points],0)+Nz([Bonus Points],0)
>
> I would like to modify this so that if [Bonus Points] is empty (Null I
> guess? - there would be no value at all) then the Total is left blank
>
> I.E.  'If Bonus Points is blank, then Total is blank, else Points +
> Bonus Points"
>
> Struggling with my IIf statement, and would appreciate some guidance
>
> Thanks
> Neil

Figured it!

Neil
From: fredg on
On Fri, 16 Apr 2010 16:49:09 -0700 (PDT), neil40(a)btinternet.com wrote:

> Hi
>
> I have a Totals column in a report that adds a Points and Bonus Points
> field using
> =Nz([Points],0)+Nz([Bonus Points],0)
>
> I would like to modify this so that if [Bonus Points] is empty (Null I
> guess? - there would be no value at all) then the Total is left blank
>
> I.E. 'If Bonus Points is blank, then Total is blank, else Points +
> Bonus Points"
>
> Struggling with my IIf statement, and would appreciate some guidance
>
> Thanks
> Neil

=IIf(IsNull([Bonus Points]),Null,Nz([Points],0)+[Bonus Points])
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
From: John Spencer on
Simplest solution is
=Nz([Points],0)+[Bonus Points]

That will return Null if Bonus points is null. In all other cases it will
return a result. So if Bonus Points is zero (and not null) you will see the
value of Points or zero if Points is null.

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

neil40(a)btinternet.com wrote:
> Hi
>
> I have a Totals column in a report that adds a Points and Bonus Points
> field using
> =Nz([Points],0)+Nz([Bonus Points],0)
>
> I would like to modify this so that if [Bonus Points] is empty (Null I
> guess? - there would be no value at all) then the Total is left blank
>
> I.E. 'If Bonus Points is blank, then Total is blank, else Points +
> Bonus Points"
>
> Struggling with my IIf statement, and would appreciate some guidance
>
> Thanks
> Neil