Re: #NUM!
- From: "bpauley" <wlp46@xxxxxxxxxxx>
- Date: Sun, 15 Mar 2009 10:10:59 -0400
Nice!
Thanks so much.
added closing ) for the sake of others reading.
Much appreciated.
Bill
"Allen Browne" <AllenBrowne@xxxxxxxxxxxxxx> wrote in message news:uOXxFGXpJHA.3868@xxxxxxxxxxxxxxxxxxxxxxx
Perhaps something like this:.
=IIf(Sum([OTHrs])=0, Null, Sum([ot]) / Sum([OTHrs])
--
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.
"bpauley" <wlp46@xxxxxxxxxxx> wrote in message
news:%23dYIBxWpJHA.1168@xxxxxxxxxxxxxxxxxxxxxxx
Hello Allen,
Thanks for the response.
It is definitely #4 of your reasons below. I should have explained that I have other text boxes producing the desired results, the OT category is zero. Can you explain how to handle that situation. I would like the text box to display a 0, as the others for OT on that line of the report display. I tried adding nz
=Sum(nz([ot]))/Sum(nz([OTHrs]))
But that did not work either
Thanks again
Bill
"Allen Browne" <AllenBrowne@xxxxxxxxxxxxxx> wrote in message news:ukKZnmRpJHA.1248@xxxxxxxxxxxxxxxxxxxxxxxThere are several reasons why this might not work, e.g.:
1.You need text boxes named OT and OTHrs on your report, bound to fields with the same name.
2. One or other of these fields is not a Number field.
For example, if they are an expression in a query, Access may think they are Text type fields.
3. There are no records in the report.
All calculated expressions error out if there's no data to calculate on.
4. The Sum([OTHrs]) equates to zero.
Division by zero always generates an error.
5. You have the text box in the Page Footer, instead of the Report Footer.
"bpauley" <wlp46@xxxxxxxxxxx> wrote in message
news:u97PERRpJHA.2124@xxxxxxxxxxxxxxxxxxxxxxx
This one sounds easy but I can't get it to work
=Sum([ot])/Sum([OTHrs]) is in a txtbox in the Report Footer
It produces #NUM!
I thought this was due to the fields in the syntax being zero.
So I changed the syntax to =Sum(nz([ot]))/Sum(nz([OTHrs]))
No difference in the result
Please help or tell me where to look for help.
I tried help in access - no dice
Searched google, used to get nice results, not any more.
Looked in Access 2000 at MS Knowledgebase, no good
- References:
- Prev by Date: NoData message to include parameter value of a query.
- Next by Date: Re: Printer Object won't persist
- Previous by thread: Re: #NUM!
- Next by thread: NoData message to include parameter value of a query.
- Index(es):
Relevant Pages
|