General discussion

Locked

Report >> Expression #Num appear need to

By hvanegas ·
Tags: Off Topic
I have a report with a calculated field, the problem arises when I preview or print the report and one of the (2 in total) fields which it uses in the calculation is zero. This displaying the #Num! error. I need code to hide this expression (text box or label, not sure) if one of the two fields are equal to zero. I know that using the properties I can build code in the On Activate event. Please help.

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Report >> Expression #Num appear need to

by gurnerworld In reply to Report >> Expression #Num ...

Can you use an If statement?

Something along the lines of
=if(field1="","",(field1*field2))

This will work in standard worksheet calculations and I think it will work in calculated fields - if it doesn't, then I apologise.

There is a function within Excel which is designed specifically for this problem which you might also like to try, which is ISERROR.

Hope this is useful.

Collapse -

Report >> Expression #Num appear need to

by hvanegas In reply to Report >> Expression #Num ...
Collapse -

Report >> Expression #Num appear need to

by gurnerworld In reply to Report >> Expression #Num ...

Addition to the previous answer:

If the calculated field is January/february then the following will only do the calculation if it doesn't produce an error.

=IF(ISERROR(January/February),0,January/February)

The formula will return a zero ifthe calculation would return an error. I can't get it to return text - can someone else help here?

Collapse -

Report >> Expression #Num appear need to

by hvanegas In reply to Report >> Expression #Num ...

I'm sorry for the confusion the report that I meant was for the MS Access Report object. I expecting something along the line of VBA code to enter into the On Print (or before) to get rid of these errors. Thanks anyway

Back to After Hours Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums