madcats
09-07-2007, 08:56 AM
I have a =sum() field in a footer of a report. I would like to show a blank if the sum is zero. I have searched the forum, and not found a solution. Any help would be appreciated.
|
View Full Version : Suppressing a =sum() field if zero madcats 09-07-2007, 08:56 AM I have a =sum() field in a footer of a report. I would like to show a blank if the sum is zero. I have searched the forum, and not found a solution. Any help would be appreciated. Uncle Gizmo 09-07-2007, 09:15 AM Create a new text box for example "txtTotal" and use the following As its control source >>> =IIf([YourField]=0,"",[YourField]) where "YourField" is the text box that contains your calculation result. Set the "visible" property of "YourField" to false. madcats 09-07-2007, 09:28 AM Worked like a charm, thanks for your help. pbaldy 09-07-2007, 10:34 AM Just to throw out an alternative that avoids extra formulas, you can use the format property of the textbox to hide zeros. If you look in help, there are actually 4 sections to the property: the formats for positive, negative, zero, and null values. Setting the third argument to "" would suppress the zero. |