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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|