A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

IIf function help please



 
 
Thread Tools Display Modes
  #1  
Old April 17th, 2010, 12:49 AM posted to microsoft.public.access.reports
[email protected]
external usenet poster
 
Posts: 60
Default IIf function help please

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
  #2  
Old April 17th, 2010, 12:58 AM posted to microsoft.public.access.reports
[email protected]
external usenet poster
 
Posts: 60
Default IIf function help please

On 17 Apr, 00:49, "
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
  #4  
Old April 17th, 2010, 02:37 PM posted to microsoft.public.access.reports
John Spencer
external usenet poster
 
Posts: 7,815
Default IIf function help please

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

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

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:48 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.