May 19, 2003 #1 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
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
May 19, 2003 #2 Aubs010 Technical User Apr 4, 2003 306 GB 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 Upvote 0 Downvote
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
May 19, 2003 #3 CosmoKramer Programmer May 29, 2001 1,730 US Try the Nz function: Code: =Nz([YourField],0) will return a 0 if null and allow the sum to work..... Upvote 0 Downvote
May 19, 2003 Thread starter #4 hp2222 MIS Apr 4, 2003 7 US I get #name? for any of these expressions. is it because the source is not recognized? Upvote 0 Downvote
May 19, 2003 #5 CosmoKramer Programmer May 29, 2001 1,730 US 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..... Upvote 0 Downvote
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.....