J
J. Trucking
Hello,
I have a query with calculates production for a machine in terms of
tonnes/hr. A use will input the starting engine hours, starting
tonnes, ending engine hours, and ending tonnes for each day. I have
an expression in a query which will subtract the starting and ending
hours/tonnes and then divide by one another. This works great unless
maintenance was being done on the machine and no production was
acheived. You then get 0/0 which produces the #Error message. I
posted this question once and someone told be to write this for my
expression:
Expr1: IIf(IsError(([TonneEnd]-[TonneStart])/([EngineEnd]-
[EngineStart])),0,([TonneEnd]-[TonneStart])/([EngineEnd]-
[EngineStart]))
However, I still get the #Error message. Is there something else I
should switch or should I somehow change the message. I would like it
to display zero if there is no production.
Thanks in advance,
John
I have a query with calculates production for a machine in terms of
tonnes/hr. A use will input the starting engine hours, starting
tonnes, ending engine hours, and ending tonnes for each day. I have
an expression in a query which will subtract the starting and ending
hours/tonnes and then divide by one another. This works great unless
maintenance was being done on the machine and no production was
acheived. You then get 0/0 which produces the #Error message. I
posted this question once and someone told be to write this for my
expression:
Expr1: IIf(IsError(([TonneEnd]-[TonneStart])/([EngineEnd]-
[EngineStart])),0,([TonneEnd]-[TonneStart])/([EngineEnd]-
[EngineStart]))
However, I still get the #Error message. Is there something else I
should switch or should I somehow change the message. I would like it
to display zero if there is no production.
Thanks in advance,
John