IIf Error Expression in Query

DoneganF

Registered User.
Local time
Today, 00:18
Joined
Aug 7, 2012
Messages
29
Hello All - I have an expression in a query in which I need to layer in an "If Error" clause. I tried the following, but received the error message;

"The expression you entered has a function containing the wrong number of arguments"

Here's the expression I entered:

NETCOLL:=IIf(IsError([PAYMENTS]/([CHARGES]-[CONTRACTUALS]),0,[PAYMENTS]/([CHARGES]-[CONTRACTUALS]))

Any insight is greatly appreciated!
 
I was actually looking for some suggestions on how to resolve the expression. But thank you for the advice on tagging future posts - I will definitely utilize tags going forward.

Again .... any help on resolving the expression is greatly appreciated!;)
 
In English, what are you trying to identify that would produce a zero value?
 
When I run the base expression, without trying to trap errors, certain records (where Charges = 0) will return the following error; #Num!

Here is the base expression
[PAYMENTS]/([CHARGES]-[CONTRACTUALS])

What I want the error expression to do is replace the #Num! with a 0.
 
certain records (where Charges = 0) will return the following error; #Num!

Mostly incorrect. Records where Charges=Contractuals will return #Num!

Use that in conjunction with Gasman's advice
 

Users who are viewing this thread

Back
Top Bottom