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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
#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
|
|||
|
|||
#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
|
|||
|
|||
#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
|
|||
|
|||
#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
|
|||
|
|||
#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 | |
|
|