HELP -- IIF Inconsistent Behavior? 
Author Message
 HELP -- IIF Inconsistent Behavior?

Mattias - you can use a Try-Catch block

Try
    tbCustName.Text = theLink.CustName.ToString
Catch (ex As Exception)
    tbCustName.Text = ""
End Try

--
This posting is provided "AS IS" with no warranties, and confers no rights.


Quote:
> Mattias...thanks. I forgot that both parts were evaluated. That explains
why
> IIF isn't working.

> So, is the If-Then-Else construction the only way to accomplish what I'm
> trying to do?



> > Steve,

> > >Now why doesn't the IIF construction below work? Shouldn't it do the
same
> > >thing as the If-Then-Else above?

> > No. If statements only evaluate either the If part or the Else part.
> > IIf, like any function, requires all parameters to be evaluated.

> > Mattias

> > ===
> > Mattias Sj?gren (VB MVP)

> > http://www.*-*-*.com/



Tue, 01 Feb 2005 04:39:46 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Remoting - very inconsistent behavior - help!

2. Inconsistent Query Behavior

3. Inconsistent behavior of database files

4. Inconsistent behavior with vb app pointing to sql2000

5. HELP: Inconsistent Results when running multiple queries with DoCmd.OpenQuery

6. How to import data that is inconsistent - PLEASE HELP IF YOU CAN

7. Help with Inconsistent/buggy UPDATE in VB5/Access2000

8. Inconsistent Return Values from SendMessageLong API Function- ANY HELP APPRECIATED

9. IIF help for all values

10. IIF HELP

11. Help using IIf statement in SQL

12. SetWindowLong APIs inconsistent behavior. Any Suggestions ....

 

 
Powered by phpBB® Forum Software