我想做下面的事情:
    if myrst.firlds(2).value 为空 then
        do something 
    end if
但是怎么判断为空的情况啊?
Help me.

解决方案 »

  1.   

    if isnull(myrst.firlds(2).value)  then
      

  2.   

    IsNull Function
          Returns a Boolean value that indicates whether an expression contains no valid data (Null).SyntaxIsNull(expression)The required expression argument is a Variant containing a numeric expression or string expression.ResIsNull returns True if expression is Null; otherwise, IsNull returns False. If expression consists of more than one variable, Null in any constituent variable causes True to be returned for the entire expression.The Null value indicates that the Variant contains no valid data. Null is not the same as Empty, which indicates that a variable has not yet been initialized. It is also not the same as a zero-length string (""), which is sometimes referred to as a null string.Important   Use the IsNull function to determine whether an expression contains a Null value. Expressions that you might expect to evaluate to True under some circumstances, such as If Var = Null and If Var <> Null, are always False. This is because any expression containing a Null is itself Null and, therefore, False.
      

  3.   

    if isnull(myrst.firlds(2).value) or myrst.firlds(2).value="" then