A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

#NUM!



 
 
Thread Tools Display Modes
  #1  
Old March 15th, 2009, 02:17 AM posted to microsoft.public.access.reports
bpauley
external usenet poster
 
Posts: 29
Default #NUM!

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

Thanks
Bill
  #2  
Old March 15th, 2009, 02:56 AM posted to microsoft.public.access.reports
Allen Browne
external usenet poster
 
Posts: 11,706
Default #NUM!

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.

--
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" wrote in message
...
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

Thanks
Bill


  #3  
Old March 15th, 2009, 12:47 PM posted to microsoft.public.access.reports
bpauley
external usenet poster
 
Posts: 29
Default #NUM!

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" wrote in message
...
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.

--
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" wrote in message
...
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

Thanks
Bill


  #4  
Old March 15th, 2009, 01:25 PM posted to microsoft.public.access.reports
Allen Browne
external usenet poster
 
Posts: 11,706
Default #NUM!

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" wrote in message
...
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" wrote in message
...
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" wrote in message
...
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


  #5  
Old March 15th, 2009, 02:10 PM posted to microsoft.public.access.reports
bpauley
external usenet poster
 
Posts: 29
Default #NUM!

Nice!
Thanks so much.
added closing ) for the sake of others reading.
Much appreciated.
Bill

"Allen Browne" wrote in message
...
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" wrote in message
...
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" wrote in message
...
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" wrote in message
...
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


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:15 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.