zero value returned in a form

H

Huntergatherer

I have two reports combined into one report.
Each report comes from a seperate query and table.

The query for the report is to get data from a specific weekending date.

All works perfectly, exept in my specific example I would like to be a ble
to display "0" when no record is returned from on of the tables. This is to
alow a sum on the main form, bases upon results of the the subforms to
function.

At present, when no record is returned, the "main form" calculation does not
work as data is missing in one of the subforms.

Many thanks in anticipation

Peter
 
D

Dennis

Try Using the Nz function which converts a Null value to any other value (in
your case 0)
e.g. Nz([calc1],0) + Nz([calc2],0) + Nz([Calc3],0)
if calc1, cal2 or calc3 is null because of no data, then it will not cause
your final total to be an error.
 
H

Huntergatherer

Thanks Denis - worked first time

10/10 !!

Dennis said:
Try Using the Nz function which converts a Null value to any other value (in
your case 0)
e.g. Nz([calc1],0) + Nz([calc2],0) + Nz([Calc3],0)
if calc1, cal2 or calc3 is null because of no data, then it will not cause
your final total to be an error.

Huntergatherer said:
I have two reports combined into one report.
Each report comes from a seperate query and table.

The query for the report is to get data from a specific weekending date.

All works perfectly, exept in my specific example I would like to be a ble
to display "0" when no record is returned from on of the tables. This is to
alow a sum on the main form, bases upon results of the the subforms to
function.

At present, when no record is returned, the "main form" calculation does not
work as data is missing in one of the subforms.

Many thanks in anticipation

Peter
 
Top