利用
MsgBox CDate("2004-1-1") > Date  得true
MsgBox CDate("2002-1-1") > Date  得false

解决方案 »

  1.   

    以下语句为什么不对?"select date as 日期,depart_name as 部门名称,file_name as 活件名称,paper_type as 纸张类型,paper_num as 纸张数量,people as 具办,kind as 业务类别 from total where 日期 >='" & txtDate1.Text & "'"(date为total中日期型字段,txtDate1为text型文本框,不过在录入时通过条件限制其输入格式为“yyyy-mm-dd”)
    请指教。谢谢!!
      

  2.   

    "select date as 日期,depart_name as 部门名称,file_name as 活件名称,paper_type as 纸张类型,paper_num as 纸张数量,people as 具办,kind as 业务类别 from total where date >='" & txtDate1.Text & "'"
      

  3.   

    假如还有错,则你的字段date也许与数据库的关键字冲突,建议[date]
      

  4.   

    "select date as 日期,depart_name as 部门名称,file_name as 活件名称,paper_type as 纸张类型,paper_num as 纸张数量,people as 具办,kind as 业务类别 from total where 日期 >=DateValue('" & txtDate1.Text & "')"
      

  5.   

    "select date as 日期,depart_name as 部门名称,file_name as 活件名称,paper_type as 纸张类型,paper_num as 纸张数量,people as 具办,kind as 业务类别 from total where 日期 >=#"+ txtDate1.Text +"#"
      

  6.   


     rs.CursorType = adOpenStatic
        rs.CursorLocation = adUseClient
        rs.LockType = adLockPessimistic strsql = "select curdate as 日期,depart_name as 部门名称,file_name as 活件名称,paper_type as 纸张类型," & "paper_num as 纸张数量,people as 具办人,kind as 业务类别 from total" &  " where " & strwhere   为什么执行以下语句后提示”至少一个参数未被指定“?           
        rs.Open strsql, DEfirst.Confirst