ASP+access数据库搜索不到结果显示问题

 <% if (Repeat1__numRows = 0) then %>
    <div>
        没有查询到结果
    </div>
    <% else %>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <% 
While ((Repeat1__numRows <> 0) AND (NOT search.EOF)) 
%>
  <tr>
    <td><%=(search.Fields.Item("key").Value)%></td>
    <td><%=(search.Fields.Item("title").Value)%></td>
  </tr>
  <% 
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  search.MoveNext()
Wend
%>
<% end if %>
    </table>
</body> 
</html>
<%
search.Close()
Set search = Nothing
%>

搜索数据库没有的关键词,页面不能显示“没有查询到结果”

说明你Repeat1__numRows这个变量值不是0罗,自己看Repeat1__numRows怎么赋值的