vb6+Access
数据库中数据是从文本文件中导入的,各字段均为字符串型,但一般都是象"457,994.98"   "0.00"这样的
    BlcChng = Val(TextBlcChng.Text) * 10000             'BlcChng 为双精  取自一个textbox的值
   QryStr = "Select CusAccNum,CusAccNam," & FieldName(1) & "," & FieldName(2) & "," & " Cdbl(" & FieldName(2) & " - " & FieldName(1) & ") From CusAccBlc where "
   QryStr = GenaQryStr & " ABS(Cdbl(" & FieldName(2) & " - " & FieldName(1) & " )) > " & BlcChng              'QryStr为查询字符串,FieldName(1)和FieldName(2)为记录字段名的字符串变量   DB_Connect         '连接函数
   Set rs = QueryExt(QryStr)      '查询函数
   If Not rs.EOF Then
     LblTip.Caption = "变动大于" & BlcChng / 10000 & "万元的账户"
     rs.MoveFirst
     While Not rs.EOF
       Text5.Text = rs.Fields(1)
       If IsNull(rs.Fields(0)) Then Text.Text = "null"       '<---  这4行是我作测试的
        If IsNull(rs.Fields(1)) Then Text1.Text = "null"         '我按F8循环几次后出现这样的错误提示:
       If IsNull(rs.Fields(2)) Then Text2.Text = "null"         '实时错误:-2147467259(80004005)
       If IsNull(rs.Fields(3)) Then Text3.Text = "null"         '无效的 null使用
       rs.MoveNext                                              '<------程序停在这一行,鼠标停在几个rs.Fields上都有值呀
     Wend
   Else
    LblTip.Caption = "没有变动大于" & BlcChng / 10000 & "的类账户"
   End If
   Disconnect