where( date()>f_createUserDate and (date()-f_createUserDate)/(f_BuyElectricityTimes)>" & txtBuyTime.Text & " and ( f_SumBuyNum/(date()-f_createUserDate)>" & txtBuyElectNum.Text & " ))

解决方案 »

  1.   

    这不是SQL语句吗?执行SQL语句是数据库引擎的事,跟系统无关,你在98下安装了吗?
      

  2.   

    可能是date()返回的值的格式不一样导致
    比较前最好将两边的作一个类型与格式的转换,这样比较就比较明了另外,在变量两边加单引号看看
      

  3.   

    是呀,我不知道有没有安装,但是其他的就能查呀例如
    where f_BuyDate between  #" & Format(DTPicker1.Value, "yyyy-mm-dd") & "# and  #" & Format(DTPicker2.Value, "yyyy-mm-dd") & "# and f_RowFlag<>255 就可以查
    但如果不加format时,在xp上就可以但98上就不行
    加上format 就可以了