Sum is Null

  • Thread starter Thread starter DS
  • Start date Start date
D

DS

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
 
DS said:
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.
 
PayAmount is a field in the reports record source.
Thanks
DS
Marshall Barton said:
DS said:
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.
 
Are you sure your text box is in the report footer and not in the page footer?
--
Duane Hookom
Microsoft Access MVP


DS said:
PayAmount is a field in the reports record source.
Thanks
DS
Marshall Barton said:
DS said:
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.
 
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 said:
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 said:
Are you sure your text box is in the report footer and not in the page
footer?
--
Duane Hookom
Microsoft Access MVP


DS said:
PayAmount is a field in the reports record source.
Thanks
DS
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.
 
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 said:
Are you sure your text box is in the report footer and not in the page
footer?
--
Duane Hookom
Microsoft Access MVP


DS said:
PayAmount is a field in the reports record source.
Thanks
DS
Marshall Barton said:
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.
 
Sorry Duane, sometimes I stay up to late and become forgetful :) !
Thank you for the answer!
DS
Duane Hookom said:
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 said:
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 said:
Are you sure your text box is in the report footer and not in the page
footer?
--
Duane Hookom
Microsoft Access MVP


:

PayAmount is a field in the reports record source.
Thanks
DS
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top