#Size error in Report (1 Viewer)

Leopard011

New member
Local time
Yesterday, 18:32
Joined
Jan 14, 2012
Messages
9
Hello!

I have a textbox in report which should sum 3 fields, The first error occurred because sometimes one of the fields returns NULL, so I've used Nz function, the problem is it's now returning #size error :banghead:

The expression is as follows:

=Nz([Query_1].[Report]![invoice],0)+Nz([Query_1].[Report]![cash],0)+Nz([Query_1].[Report]![cheque],0)

After googling it for a while, I suppose this error occurred if there was no record resulted in the query, therefore I should use a Iferror function, and I don't know how! :confused:
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 18:32
Joined
Aug 30, 2003
Messages
36,125
Those references look off. Try simply:

=Nz([invoice],0)+Nz([cash],0)+Nz([cheque],0)
 

Leopard011

New member
Local time
Yesterday, 18:32
Joined
Jan 14, 2012
Messages
9
They are referring to fields in subreport.
 

Leopard011

New member
Local time
Yesterday, 18:32
Joined
Jan 14, 2012
Messages
9
Dear Paul,

Thanks for your help, really appreciated.

As for the link, I'm a little bit confused, how could I use it as an expression not using VBA?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 09:32
Joined
May 7, 2009
Messages
19,231
=IIF([Query_1].[Report].HasData, Nz([Query_1].[Report]![invoice],0)+Nz([Query_1].[Report]![cash],0)+Nz([Query_1].[Report]![cheque],0), 0)
 

Users who are viewing this thread

Top Bottom