rs.Source = "select shuliang,wuzibh from CaiJuLeiWuZi where wuzibh = -1166237008"没问题,可是如果
dim iBH as long
iBH=-1166237008
rs.Source = "select shuliang,wuzibh from CaiJuLeiWuZi where wuzibh = long"就不对呢?提示"No value given for one or more required parameters"我如果改成
dim iBH as long
iBH=-1166237008
rs.Source = "select shuliang,wuzibh from CaiJuLeiWuZi where wuzibh = 'long'"还是不对?提示"标准表达式中数据类型不匹配"我要怎么办,请高手解救!

解决方案 »

  1.   

    rs.Source = "select shuliang,wuzibh from CaiJuLeiWuZi where wuzibh = '"iBH"'"
      

  2.   

    rs.Source = "select shuliang,wuzibh from CaiJuLeiWuZi where wuzibh = " & cstr(iBH)
      

  3.   

    rs.Source = "select shuliang,wuzibh from CaiJuLeiWuZi where wuzibh = ' & iBH & '
    也行
      

  4.   

    rs.Source = "select shuliang,wuzibh from CaiJuLeiWuZi where wuzibh = " & cstr(iBH)
    donglw(天行) 没问题
      

  5.   

    rs.Source = "select shuliang,wuzibh from CaiJuLeiWuZi where wuzibh = " & iBH & ""
      

  6.   

    rs.Source = "select shuliang,wuzibh from CaiJuLeiWuZi where wuzibh = " & iBH 
      

  7.   

    rs.Source = "select shuliang,wuzibh from CaiJuLeiWuZi where wuzibh = " & iBH
    也行
      

  8.   

    "select shuliang,wuzibh from CaiJuLeiWuZi where wuzibh = "& iBH
      

  9.   

    你自己看看哪里有问题,不就的了
    long是什么?iBH又是什么?何必要那么多人说呢