% Dim RS Dim intPage Dim intTotalPages Dim fldF Dim intRec Dim strQuote Dim strScriptName norecord = false strQuote = Chr(34) nPage = CLng(Request.QueryString ("Page")) RS.PageSize = 10 RS.CursorLocation = 3'adUseClient if Request.form("lname") = "" then searchname = Request.QueryString("lname") strname = Request.QueryString("lname")&"%" else searchname = Request.form("lname") strname = Request.Form("lname")&"%" end if s="lname="&searchname SQL = "SELECT id, lname, fname, mi, phone, email, entrydate FROM tblAlumni WHERE lname >= '"& strname &"' ORDER BY lname, fname DESC" RS.Open sql, connstring if RS.EOF then norecord = true nPageCount = 0 curr_record = 0 currlast_record = 0 cnt = 0 nPage = 1 else 'Set the page size of the recordset RS.PageSize = 20 'Get the number of pages nPageCount = RS.PageCount cnt = RS.RecordCount If nPage < 1 or nPage > nPageCount then nPage = 1 end if 'Position recordset to the correct page RS.AbsolutePage = nPage 'Current records curr_record = RS.bookmark if nPage = nPageCount then currlast_record = RS.RecordCount else currlast_record = (RS.bookmark + RS.PageSize) - 1 end if End if color = "#ffffff" ftitle = "Events Calendar" %>