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  

Sum is Null



 
 
Thread Tools Display Modes
  #1  
Old May 9th, 2007, 09:33 PM posted to microsoft.public.access.reports
DS
external usenet poster
 
Posts: 285
Default Sum is Null

I have an unbound textbox on a report footer and if it's null or on error
comes up I want a 0 to appear. This is what I have and it doesn't seem to
work.

=Nz(Sum([PayAmount]),0)

I just get an #Error.

Anu help is appreciated,
Thanks
DS


  #2  
Old May 9th, 2007, 10:21 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Sum is Null

DS wrote:

I have an unbound textbox on a report footer and if it's null or on error
comes up I want a 0 to appear. This is what I have and it doesn't seem to
work.

=Nz(Sum([PayAmount]),0)



That PayAmount name in the expression MUST be a field in the
report's record source table/query. It can not be the name
of a control on the report.

--
Marsh
MVP [MS Access]
  #3  
Old May 10th, 2007, 02:43 AM posted to microsoft.public.access.reports
DS
external usenet poster
 
Posts: 285
Default Sum is Null

PayAmount is a field in the reports record source.
Thanks
DS
"Marshall Barton" wrote in message
...
DS wrote:

I have an unbound textbox on a report footer and if it's null or on error
comes up I want a 0 to appear. This is what I have and it doesn't seem to
work.

=Nz(Sum([PayAmount]),0)



That PayAmount name in the expression MUST be a field in the
report's record source table/query. It can not be the name
of a control on the report.

--
Marsh
MVP [MS Access]



  #4  
Old May 10th, 2007, 03:50 AM posted to microsoft.public.access.reports
Duane Hookom
external usenet poster
 
Posts: 7,177
Default Sum is Null

Are you sure your text box is in the report footer and not in the page footer?
--
Duane Hookom
Microsoft Access MVP


"DS" wrote:

PayAmount is a field in the reports record source.
Thanks
DS
"Marshall Barton" wrote in message
...
DS wrote:

I have an unbound textbox on a report footer and if it's null or on error
comes up I want a 0 to appear. This is what I have and it doesn't seem to
work.

=Nz(Sum([PayAmount]),0)



That PayAmount name in the expression MUST be a field in the
report's record source table/query. It can not be the name
of a control on the report.

--
Marsh
MVP [MS Access]




  #5  
Old May 10th, 2007, 03:52 PM posted to microsoft.public.access.reports
Duane Hookom
external usenet poster
 
Posts: 7,177
Default Sum is Null

If you would have mentioned "when there are no records" in your first post,
Marsh would have provided the correct reply in his post.

=IIf(HasData=True, Nz(Sum([PayAmount]),0),0)

--
Duane Hookom
Microsoft Access MVP


"DS" wrote:

Definitley in the report footer. When there are records it works fine, only
when there are no records I get an #Error. Is it incorrect to use this on
no records?
Thanks
DS
"Duane Hookom" wrote in message
...
Are you sure your text box is in the report footer and not in the page
footer?
--
Duane Hookom
Microsoft Access MVP


"DS" wrote:

PayAmount is a field in the reports record source.
Thanks
DS
"Marshall Barton" wrote in message
...
DS wrote:

I have an unbound textbox on a report footer and if it's null or on
error
comes up I want a 0 to appear. This is what I have and it doesn't seem
to
work.

=Nz(Sum([PayAmount]),0)


That PayAmount name in the expression MUST be a field in the
report's record source table/query. It can not be the name
of a control on the report.

--
Marsh
MVP [MS Access]






  #6  
Old May 10th, 2007, 04:17 PM posted to microsoft.public.access.reports
DS
external usenet poster
 
Posts: 285
Default Sum is Null

Definitley in the report footer. When there are records it works fine, only
when there are no records I get an #Error. Is it incorrect to use this on
no records?
Thanks
DS
"Duane Hookom" wrote in message
...
Are you sure your text box is in the report footer and not in the page
footer?
--
Duane Hookom
Microsoft Access MVP


"DS" wrote:

PayAmount is a field in the reports record source.
Thanks
DS
"Marshall Barton" wrote in message
...
DS wrote:

I have an unbound textbox on a report footer and if it's null or on
error
comes up I want a 0 to appear. This is what I have and it doesn't seem
to
work.

=Nz(Sum([PayAmount]),0)


That PayAmount name in the expression MUST be a field in the
report's record source table/query. It can not be the name
of a control on the report.

--
Marsh
MVP [MS Access]






  #7  
Old May 10th, 2007, 05:40 PM posted to microsoft.public.access.reports
DS
external usenet poster
 
Posts: 285
Default Sum is Null

Sorry Duane, sometimes I stay up to late and become forgetful !
Thank you for the answer!
DS
"Duane Hookom" wrote in message
...
If you would have mentioned "when there are no records" in your first
post,
Marsh would have provided the correct reply in his post.

=IIf(HasData=True, Nz(Sum([PayAmount]),0),0)

--
Duane Hookom
Microsoft Access MVP


"DS" wrote:

Definitley in the report footer. When there are records it works fine,
only
when there are no records I get an #Error. Is it incorrect to use this
on
no records?
Thanks
DS
"Duane Hookom" wrote in message
...
Are you sure your text box is in the report footer and not in the page
footer?
--
Duane Hookom
Microsoft Access MVP


"DS" wrote:

PayAmount is a field in the reports record source.
Thanks
DS
"Marshall Barton" wrote in message
...
DS wrote:

I have an unbound textbox on a report footer and if it's null or on
error
comes up I want a 0 to appear. This is what I have and it doesn't
seem
to
work.

=Nz(Sum([PayAmount]),0)


That PayAmount name in the expression MUST be a field in the
report's record source table/query. It can not be the name
of a control on the report.

--
Marsh
MVP [MS Access]








 




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 09:13 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.