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
|
|||
|
|||
#Error & #Name?
Hi
I can not figure out how too get ot of a simple problem: In a footer of a report I have a formula in a text box that work ok when there are values to handle, but when it's emtpy strings it dont work. The values are coming from other text boxes in the same footer. This is simply the formula ([a]/[b]-1) and what i tried to do and what the result is: Iff(IsError([a]/[b]-1);"";([a]/[b]-1)), result: #Name? Iff([HasData];([a]/[b]-1);""), result: #Name? Iff([HasData]=0;([a]/[b]-1);""), result: #Name? and so on...... I am running out of "solutions". I would be pleased if anyone know what to do. -- TomH |
#2
|
|||
|
|||
#Error & #Name?
Check help for the Nz function. Something like:
Nz([a]/[b]-1) could do it, or there are other parameters to Nz, as explained in Help. "TomH" wrote in message ... Hi I can not figure out how too get ot of a simple problem: In a footer of a report I have a formula in a text box that work ok when there are values to handle, but when it's emtpy strings it dont work. The values are coming from other text boxes in the same footer. This is simply the formula ([a]/[b]-1) and what i tried to do and what the result is: Iff(IsError([a]/[b]-1);"";([a]/[b]-1)), result: #Name? Iff([HasData];([a]/[b]-1);""), result: #Name? Iff([HasData]=0;([a]/[b]-1);""), result: #Name? and so on...... I am running out of "solutions". I would be pleased if anyone know what to do. -- TomH |
#3
|
|||
|
|||
#Error & #Name?
You might try
IIF([b]=0,Null,[a]/[b]-1) "TomH" wrote in message ... Hi I can not figure out how too get ot of a simple problem: In a footer of a report I have a formula in a text box that work ok when there are values to handle, but when it's emtpy strings it dont work. The values are coming from other text boxes in the same footer. This is simply the formula ([a]/[b]-1) and what i tried to do and what the result is: Iff(IsError([a]/[b]-1);"";([a]/[b]-1)), result: #Name? Iff([HasData];([a]/[b]-1);""), result: #Name? Iff([HasData]=0;([a]/[b]-1);""), result: #Name? and so on...... I am running out of "solutions". I would be pleased if anyone know what to do. -- TomH |
#4
|
|||
|
|||
#Error & #Name?
Nz helped.
If b=0 solves of course dividing zero problem. Big thanks. -- TomH John Spencer skrev: You might try IIF([b]=0,Null,[a]/[b]-1) "TomH" wrote in message ... Hi I can not figure out how too get ot of a simple problem: In a footer of a report I have a formula in a text box that work ok when there are values to handle, but when it's emtpy strings it dont work. The values are coming from other text boxes in the same footer. This is simply the formula ([a]/[b]-1) and what i tried to do and what the result is: Iff(IsError([a]/[b]-1);"";([a]/[b]-1)), result: #Name? Iff([HasData];([a]/[b]-1);""), result: #Name? Iff([HasData]=0;([a]/[b]-1);""), result: #Name? and so on...... I am running out of "solutions". I would be pleased if anyone know what to do. -- TomH |
#5
|
|||
|
|||
#Error & #Name?
By the way, I noticed a new problem.
I have an unbound report including a subreport. this subreport is including another subreport, say with other words 3 levels. In the subreport (level 2) the sums shows nothing when theres no data. The sums are sums of data in the subreport on level 3. Thats the way it shold be. When I see on the sums in the subreport from the main report, they show #Error. What do I do wrong? The main report is only a can for the subreports. If you need more info, be pleased to ask. -- TomH TomH skrev: Hi I can not figure out how too get ot of a simple problem: In a footer of a report I have a formula in a text box that work ok when there are values to handle, but when it's emtpy strings it dont work. The values are coming from other text boxes in the same footer. This is simply the formula ([a]/[b]-1) and what i tried to do and what the result is: Iff(IsError([a]/[b]-1);"";([a]/[b]-1)), result: #Name? Iff([HasData];([a]/[b]-1);""), result: #Name? Iff([HasData]=0;([a]/[b]-1);""), result: #Name? and so on...... I am running out of "solutions". I would be pleased if anyone know what to do. -- TomH |
#6
|
|||
|
|||
#Error & #Name?
If the main report is unbound, what sum to you hope to have on the
subreport? Without knowing a few details it is impossible to know what is wrong. I assume Error# is showing up in a text box. From where does that text box get its data? What formula or expression is producing Error#? By the way, this latest question should be a new thread. I usually don't continue to monitor a thread after the issue has been resolved, but in this case I just forgot to strop monitoring. Your best chance for having a lot of people see a new question is to start a new thread. "TomH" wrote in message ... By the way, I noticed a new problem. I have an unbound report including a subreport. this subreport is including another subreport, say with other words 3 levels. In the subreport (level 2) the sums shows nothing when theres no data. The sums are sums of data in the subreport on level 3. Thats the way it shold be. When I see on the sums in the subreport from the main report, they show #Error. What do I do wrong? The main report is only a can for the subreports. If you need more info, be pleased to ask. -- TomH TomH skrev: Hi I can not figure out how too get ot of a simple problem: In a footer of a report I have a formula in a text box that work ok when there are values to handle, but when it's emtpy strings it dont work. The values are coming from other text boxes in the same footer. This is simply the formula ([a]/[b]-1) and what i tried to do and what the result is: Iff(IsError([a]/[b]-1);"";([a]/[b]-1)), result: #Name? Iff([HasData];([a]/[b]-1);""), result: #Name? Iff([HasData]=0;([a]/[b]-1);""), result: #Name? and so on...... I am running out of "solutions". I would be pleased if anyone know what to do. -- TomH |
Thread Tools | |
Display Modes | |
|
|