Re: #Num! Error
From: Allen Browne (AllenBrowne_at_SeeSig.Invalid)
Date: 09/01/04
- Next message: Ynot: "Re: Openreport to print only one page with multipage sub-report?"
- Previous message: Pilar: "RE: Hiding a Sub Report"
- In reply to: Crown Royal: "#Num! Error"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 2 Sep 2004 01:02:18 +0800
Use IIf() to test for zero in the divisor:
=IIf([RackTodayAnalysis] = 0, 0,
DSum("[TransientRackRate]","[qryRoomsDaily]")/[RackTodayAnalysis])
-- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Crown Royal" <CrownRoyal@discussions.microsoft.com> wrote in message news:7ED25B2A-134C-4377-9440-9F2F8F602085@microsoft.com... >I have a report in which one part calculates the results from one field > divided by another. When there is a number in the divisor, everthing is > fine, > but when the divisor is zero (the dividend is always zero at that point as > well), I get the Num error. The control source for this control is: > =DSum("[TransientRackRate]","[qryRoomsDaily]")/[RackTodayAnalysis] > I have tried to add an Iff to it, but I guess "And" is not what I need. > Thx > for any help > > Eric
- Next message: Ynot: "Re: Openreport to print only one page with multipage sub-report?"
- Previous message: Pilar: "RE: Hiding a Sub Report"
- In reply to: Crown Royal: "#Num! Error"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|