Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

two questions in one

Status
Not open for further replies.

hp2222

MIS
Apr 4, 2003
7
US
Hi i am getting "#error" when value of the sum is null.

any idea?

Also how to modify format so that all the fields would have same decimal point in the number value?

thanks
 
in answer to the first part:

=IIf(OR([data1]="",[data1] is null,[data2]="",[data2] is null)=True,"0.00",[data1]+[data2])

Something like that in the control source hopefully might do the trick...

Or just

=IIF([data] is null,"",[data])
or
=IIF(isnull([data]),"",[data])

Not sur eif the last two would work properly...

HOpe it's of some use!

Aubs
 
Try the Nz function:
Code:
=Nz([YourField],0)
will return a 0 if null and allow the sum to work.....
 
I get #name? for any of these expressions. is it because the source is not recognized?

 
Try that syntax in an unbound text box, and make sure to replace [YourName] with the actual name of the field from your table/query.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top