http://www.foxtable.com/webhelp/topics/1485.htm,看是哪一句代码出错
startdate0是日期控件还是文本框?
msgbox("企业名称 Like '*" & Forms("mainform").controls("目标考核企业名称").value & "*' And 年度 Like '*" & Forms("mainform").controls("目标考核年度").value & "*'and 考核日期 >= #" & Forms("更多查询条件").controls("startdate0").Value & "# and 考核日期 <= #" & Forms("更多查询条件").controls("enddate0").Value & "#")