sql = "select * from [外出] where DateDiff('d',wcdate,date())=0 and wcname='" & replace(Trim(rs("name").value), "'", "''") & "'"
------解决方案-------------------- sql="select * from 外出 where wcdate=date() and wcname="&rs("name")
------解决方案--------------------