>
This works:>
>If rsResults("GA")=0 Then
> m_GA = ""
>Else
> m_GA = ConvertNull(rsResults("GA"))
>End If
>
But this doesn't (Type mismatch error):>
>m_GA = IIf(rsResults("GA")=0,"",ConvertNull(rsResults("GA")))
>
Anyone know why? TIA.
Unlike VFP, VBSCript (and VB for that matter) evaluates both expressions in an IIF() (even if the first is already foound to be true). Once they are both evaluated, then the appropriate one is performed. However, by that time, it could already have caused an error.
FWIW, VB 7 is supposed to stop after it finds the first true expression (as VFP does now).
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao