3.
改成:
searchstr="select * from tops where 发表时间 >'" &dateadd("d",datanum,now)& "'"

解决方案 »

  1.   

    3、日期左右使用引号,因为空格会把它分开了:
    searchstr="select * from tops where 发表时间 >'" &dateadd("d",datanum,now)&"'"
      

  2.   

    4、使用JS来控制,代码类似,可以改造一下:
    <input type=button value=upload onclick=f_upload()>
    <input type=button value=cancel onclick=f_cancel() style="display:none">
    <script>
    function f_upload()
    {
    //上传的控制
    //.....
    document.all.cancel.style.display="block"
    }
    function f_cancel()
    {
    document.execCommand('stop')"
    document.all.cancel.style.display="none"
    }
    </script>
      

  3.   

    2003-9-23 00:00:00  日期和时间之间的空格 是sql 产生了错误
    她把 发表时间 > 2003-9-23  作为了一个条件  00:00:00 变成了多于的
    首先要看一下你的 发表时间 是什么格式 可以用 format 格式化成相同的格式进行比较!!
    还有的问题就是 如果你的 发表时间时间如果是字符串格式的 (从你的sql 语句看应该是)
    就会出现 2003-10-01 小于 2003-9-23 的情况  因为他们是按字符串比较的 比较月的时候 首先比较 1 和9   1<9 其余的不比了  所以你要把你的发表时间 先转换成 日期型 oracle 中 有 todate 函数
      

  4.   

    sorry 从你的sql 语句看发表时间应该日期型的 条件加上单引号 就不行了
      

  5.   

    我的查询条件是查询近多少天的内容。
    searchstr="select * from tops where 发表时间 >" &dateadd("d",datanum,now)
    "datanum"就是我的查询参数。
      

  6.   

    改成:
    searchstr="select * from tops where 发表时间 >'" &dateadd("d",datanum,now)& "'"
    出现的错误是:标准表达式中数据类型不匹配。
      

  7.   

    searchstr="select * from tops where 发表时间 > dateadd(d,datanum,now)"
      

  8.   

    searchstr="select * from tops where 发表时间 >" &cdate(dateadd("d",datanum,now))
    我把语句改成上面的还是不行。出现的错误还是:语法错误 (操作符丢失) 在查询表达式 '发表时间 >2003-9-19 12:54:48' 中。 
    “发表时间”这个字段是在access创建的,格式是时间/日期 默认值为now();
    下面还有哪个高手赐教?
      

  9.   


    用cnhgj(戏子.Com?俺真TMD够菜):
    searchstr="select * from tops where 发表时间 > dateadd(d,datanum,now)"
    出现的错误是:
    至少一个参数没有被指定值。
      

  10.   

    你的sql 语句看发表时间应该日期型的 条件加上单引号 就不行了发表时间的日格式是什么样子的??你的 查询条件要格式化成相同的格式
    发表时间 >#"  & dateadd(d,datanum,date.today)" &"#"日期药用 ## 包含起来
      

  11.   

    searchstr="select * from tops where 发表时间 > dateadd(d,datanum,now)"这样的话
    她把dateadd(d,datanum,now) 当选择条件了
      

  12.   

    第三个问题解决了!在这里谢谢各位大哥,尤其是YAOTIEBING(我爱我家),给我不少提示。我是用这个语句来实现了:
    searchstr="select * from tops where 发表时间 >#"  & dateadd("d",datanum,now) &"#"
    能继续帮小弟解决第四个问题吗?这样我容易给分拉!
      

  13.   

    互相 学习  popcorn(米花)  的方法你可以试试看 一定要多动手做 呵呵