PDA

View Full Version : IIF( ISERROR(...



jmenche
10-11-2005, 09:06 AM
Hi,

In Excel, I can always trap if a formula generates an error message in an IF statement...=IF(ISERROR(some formula),True,False).

However, I cannot duplicate this in a query expression...=IIF(ISERROR(some formula),True,False) still produces an error message.

Any thoughts?

Norie
10-11-2005, 10:02 AM
What error are you trying to trap?

jmenche
10-11-2005, 10:11 AM
I have a division formula that generates '#Error'. However, I was also wondering if there were a generic way (like in Excel) to trap ANY error.

Norie
10-11-2005, 11:00 AM
Well there actually is an IsError function in Access.

I don't know how it works, I generally try to avoid errors. :)

Is the error due to division by 0?

jmenche
10-12-2005, 05:16 AM
Yes. It's a division by zero error.

Norie
10-12-2005, 06:32 AM
Well I don't think IsError will catch that error.

At least it didn't in my limited testing