请问我怎样实现对输入是否为空(即没有输入)进行判断??
if text1.text<>  ???????   then
谢谢你们哈

解决方案 »

  1.   

    if text1.text="" then
     ...........
    else 
    ............
    endif
    上边的意思就是如果text1.text为空的时候........否则...........。
      

  2.   

    if trim(text1.text)="" then
        msgbox "text1为空"
    else
        msgbox "text1不为空"
    end if
      

  3.   

    空格算不算输入?如果不算, Leftie(左手)的对;如果算,LCAAA(小小程序员) 的对。
      

  4.   

    if trim(text1.text)=empty then
        msgbox "text1为空"
    else
        msgbox "text1不为空"
    end if
      

  5.   

    if len(trim(text1.text))=0 then
        msgbox "text1为空"
    else
        msgbox "text1不为空"
    end if
      

  6.   

    if trim(text1.text)="" then
        msgbox "text1为空"
    else 
        msgbox "text1不为空"
    end if
      

  7.   

    最好用zyl910(910:分儿,我又来了!) 的方法,
    因为用len去判断长度,速度最快。
      

  8.   

    if len(trim(text1.text))=0 then
        msgbox "text1为空"
    else
        msgbox "text1不为空"
    end if
      

  9.   

    为什么大家一说到判断空值就都用函数Trim呢?
    空格就是空格呀!空格不是空值呀!
    难道是我错了?
      

  10.   

    我也很郁闷,为什么空格就不是字符?
    最简单的办法是2楼的,
    或者是len(text1.text)=0也可以
      

  11.   

    fishtrees(鱼鱼)没有错,空格不是空值,我觉得也是这样的。
    if text.text="" thenelseendif
      

  12.   

    if isnull(text1.text) or trim(text1.text)="" then
      ……
       else
      ……
      end if
    或者:
     if not isnull(text1.text) and trim(text1.text)<>"" then
      ……
       else
      ……
      end if
      

  13.   

    对于lisen101(一笑而过)的观点我认为不妥
      

  14.   

    还有个问题啊,trim()这个函数是啥子意思???