zero value returned in a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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.
 
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
 

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

Back
Top