改为select * from 出库表 where 领走时间=#'" & Date &"'# 

解决方案 »

  1.   

    sqlstr="select * from 出库表 where 领走时间=#" & Date & "#"
    应该这样就对了,因为我刚用了的。
      

  2.   

    好像应该这样写,"select * from 出库表 where 领走时间=#'" & Date & "'#",试一试吧!
      

  3.   

    select * from 出库表 where 领走时间=#" & Date & "#
    是这样的,
    漏掉#了
    我运行没有错
    可就是查找不到记录
    可我的数据库里明明有相符合的记录啊
      

  4.   

    "select * from 出库表 where 领走时间= #" & Format(Date, "yyyy-mm-dd") & "#"
    这样就行了,感谢“地狱情人”
    可是为什么啊????????
      

  5.   

    select * from 出库表 where 领走时间='" & Date & "'"
      

  6.   

    sql有好几种,细节不太一样,你用的是哪种