Hi all,
I have this sql in my querry to calcuate the rate:
Rate:([Yes]/([Yes]+[No])). And in my report, I set the format of the field to "percentage ", but then when the sum of Yes + No is =0, it shows #Error, and I do not want the report to have "#Error", instead I would like it to say: "Dem 0", then I modify my sql as follow:
Rate: IIf(([Yes]+[No])=0,"Dem 0",([Yes]/([Yes]+[No])))
the "Dem 0" works well for the ones with demoniator=0, but then I can't set the format on the form to "percentage " anymore, so it'll say 0.333333, instead of %, for the ones with demoniator is not euqal to 0.
Can someone please help? basically, I would like to get rid of the "#Error", when the demoninator =0, but still be able to keep the % format.
Thank you!
bluemoon
I have this sql in my querry to calcuate the rate:
Rate:([Yes]/([Yes]+[No])). And in my report, I set the format of the field to "percentage ", but then when the sum of Yes + No is =0, it shows #Error, and I do not want the report to have "#Error", instead I would like it to say: "Dem 0", then I modify my sql as follow:
Rate: IIf(([Yes]+[No])=0,"Dem 0",([Yes]/([Yes]+[No])))
the "Dem 0" works well for the ones with demoniator=0, but then I can't set the format on the form to "percentage " anymore, so it'll say 0.333333, instead of %, for the ones with demoniator is not euqal to 0.
Can someone please help? basically, I would like to get rid of the "#Error", when the demoninator =0, but still be able to keep the % format.
Thank you!
bluemoon
Comment