How to clear the Filter Setup?
When the Filter Properties have been set, How we can clear the Filter setup to s How all records?
The ASP codes are written and described as below:
<%
Set conn = Server.CreateObject("Adodb.Connection")
conn.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("db1.mdb")
Set rs = Server.CreateObject("Adodb.Recordset")
rs.Open "Member",conn,1,3
%>
<% rs.Filter = "Location = 'LA'" 'We set a filter that the recordset only s How the member location is "LA" If rs.EOF Then 'If Eof is True; that means is not record %> <% Else Do while Not rs.eof %> <% rs.movenext Loop End If %>
No member... <%=rs("MemID")%> <%=rs("MemberName")%> <%=rs("Location")%>
<% rs.Filter = "" 'Now we clear the Filter setup If rs.EOF Then %> <% Else Do while Not rs.eof %> <% rs.movenext Loop End If rs.Close Set rs = Nothing %>
No member...
<%=rs("MemID")%> <%=rs("MemberName")%> <%=rs("Location")%>
No comments:
Post a Comment