Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"#Error" value change to "-". How to do it? :)

Status
Not open for further replies.

SheilaAlighieri

Technical User
Nov 16, 2002
68
NL
Hi all!

I want to rename a "#Error" value to "-". It looks much better :) But I am not sure how to do it.

Thanks..

Sheila!
 
I don't think you can. "#Error" is a built in message when a calculation is in error. You would be better off getting rid of the error to begin with. What are you doing that is causing the error.

Paul
 
Hi Paul,

Ofcourse you are right. But here is the situation. I use the following expression:

% A/T: [Actual Sum]/[Turn]

Works great as long there is a value for the turn field.
For example: 100/1000=0,10. But when the turn field is empty I get the #error value :) For example: 100/0=#error :) Ofcourse this is no surprise.. I just wondered how I could get rid of the #error value cause it makes my report look bad.

Thanks,

Sheila

 
Try this
% A/T: IIf(IsNull([Turn]) Or [Turn] = 0,"-",[Actual Sum]/[Turn])

See if that does it for you.

Paul
 
Paul, when I do that I get an error message: "The expression you entered contains invalid syntax. You may have entered an operand without an operator" :(

Thanks again,

Sheila
 
I'm not sure where the problem is Sheila. I put this expression in one of my queries

% A/T: IIf(IsNull([TimeAllocated]) Or [TimeAllocated]=0,"-",[Total]/[TimeAllocated])

and it ran fine. I would say you need to double check all your brackets and commas and everything to make sure you didn't miss something. It should run as is.

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top