Re: #NUM!

Tech-Archive recommends: Speed Up your PC by fixing your registry



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@xxxxxxxxxxxxxxxxxxxxxxx
There 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

.



Relevant Pages

  • Re: #NUM!
    ... Allen Browne - Microsoft MVP. ... I should have explained that I have other text boxes producing the desired results, the OT category is zero. ... I would like the text box to display a 0, as the others for OT on that line of the report display. ... You have the text box in the Page Footer, instead of the Report Footer. ...
    (microsoft.public.access.reports)
  • Re: Showing data from query and also showing data that does NOT match
    ... Allen Browne - Microsoft MVP. ... and date report linking the EmployeeID fields. ... in the Report Footer section sounds like a perfectly sensible approach. ...
    (microsoft.public.access.reports)
  • Re: #NUM!
    ... I should have explained that I have other text boxes producing the desired results, the OT category is zero. ... I would like the text box to display a 0, as the others for OT on that line of the report display. ... You have the text box in the Page Footer, instead of the Report Footer. ...
    (microsoft.public.access.reports)
  • Re: #NUM!
    ... 1.You need text boxes named OT and OTHrs on your report, bound to fields with the same name. ... All calculated expressions error out if there's no data to calculate on. ... Division by zero always generates an error. ... You have the text box in the Page Footer, instead of the Report Footer. ...
    (microsoft.public.access.reports)
  • Re: no. of records in report
    ... Allen Browne - Microsoft MVP. ... I have a report in a datasheet format, w/ one employee per row that shows ... report footer) the no. of records in this report? ...
    (microsoft.public.access.tablesdbdesign)