error in a sumcontrol when null in subreport

G

Guest

Hi

I have Access 2003 and a report with subreports.
I have have a sum control (Currency) where I get error when it is null in
the subreport mentioned.

I guess I need a nz here but cannot figure out how to bracket it correct

=ResultReportSub.Report![Sum of Price]

Thanks in advance
 
G

Guest

In the [Sum of Price] field in the subform, I assume you have

=Sum([Price]) with the price field name or other name, change it to

=Sum(nz([Price],0))
 
G

Guest

Hi

First it did not accept , so changed it to ; and not it looks like this:
=Sum(nz([NettoprisSEK1];0))

But still receive the same error when null in the subreport

What can be wrong

Mattias

Ofer said:
In the [Sum of Price] field in the subform, I assume you have

=Sum([Price]) with the price field name or other name, change it to

=Sum(nz([Price],0))
--
I hope that helped
Good luck


Mattias said:
Hi

I have Access 2003 and a report with subreports.
I have have a sum control (Currency) where I get error when it is null in
the subreport mentioned.

I guess I need a nz here but cannot figure out how to bracket it correct

=ResultReportSub.Report![Sum of Price]

Thanks in advance
 
D

Duane Hookom

Is the subreport empty (returns no rows) or are there null values? If the
subreport doesn't return any rows use:

=IIf(ResultReportSub.Report.HasData, ResultReportSub.Report![Sum of Price],
0)

--
Duane Hookom
MS Access MVP


Mattias said:
Hi

First it did not accept , so changed it to ; and not it looks like this:
=Sum(nz([NettoprisSEK1];0))

But still receive the same error when null in the subreport

What can be wrong

Mattias

Ofer said:
In the [Sum of Price] field in the subform, I assume you have

=Sum([Price]) with the price field name or other name, change it to

=Sum(nz([Price],0))
--
I hope that helped
Good luck


Mattias said:
Hi

I have Access 2003 and a report with subreports.
I have have a sum control (Currency) where I get error when it is null
in
the subreport mentioned.

I guess I need a nz here but cannot figure out how to bracket it
correct

=ResultReportSub.Report![Sum of Price]

Thanks in advance
 
G

Guest

Hi

The IIf made the error dissapere.

Thanks!

Mattias

Duane Hookom said:
Is the subreport empty (returns no rows) or are there null values? If the
subreport doesn't return any rows use:

=IIf(ResultReportSub.Report.HasData, ResultReportSub.Report![Sum of Price],
0)

--
Duane Hookom
MS Access MVP


Mattias said:
Hi

First it did not accept , so changed it to ; and not it looks like this:
=Sum(nz([NettoprisSEK1];0))

But still receive the same error when null in the subreport

What can be wrong

Mattias

Ofer said:
In the [Sum of Price] field in the subform, I assume you have

=Sum([Price]) with the price field name or other name, change it to

=Sum(nz([Price],0))
--
I hope that helped
Good luck


:

Hi

I have Access 2003 and a report with subreports.
I have have a sum control (Currency) where I get error when it is null
in
the subreport mentioned.

I guess I need a nz here but cannot figure out how to bracket it
correct

=ResultReportSub.Report![Sum of Price]

Thanks in advance
 

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

Top